A court in Malawi has halted work on a statue of Mahatma Gandhi after critics accused him of using racial slurs.