lib: adding command to print API Version
lib: updating response to include API Version
lib: moving json output to common area
lib: adding function to send status code

Since http_response_code is not implemented in all versions of PHP,
we rolled out our own function to do the same.
lib: updating http response version