Implementing batch

A request is stored in $this-batchRequest. If the request is
a single one, then encapsulate it into a simple array. Later,
(at the sendResponse() function) we'll detect if its a single or
batch request and return the right data.

Also: the content-type header function is moved to the top of the
document, in case there is some output before we can set the
header.