Add contentType getter to ScriptableRequest.

Returns the value of the Content-Type header (without the parameters (eg
charset)).
Add bodyAsJsonString getter to ScriptableRequest.

bodyAsJsonString returns the JSON body as a string if the content-type is
either "text/json" or "application/json".