Improve Ajax API, more ajax tests

Using martini for ajax tests, enable sourcemaps in testserver