Revamped REST test suite and added new case

The tests are now wrapped in a class (TestRESTInterface), because
otherwise the setup() function is called only at the start.
Also, added a test case for insertion of malformed POST data.