Implemented Model::toArray and Model::toJson. Model now implements Countable, IteratorAggregate and Serializable.

Response::setContent now sets the Content-Type: text/json header when given an array. Response now overwrites headers when sending them.