Add new exception class: StateError.

It can be used to indicate that something was done on something at the
wrong time.
Add new type testing method for `Value` class.

`AsBool` method can be used to make sure that the value is a boolean
value.
Change the way response headers work.

The new way is more consistent with other similiar methods in our C++
API.
Implement more response API.

Adds new methods for the response object.
Merge pull request #18 from peelonet/response-api

Response API