Added HTTPError, improved routes handling

Route actions can now throw HTTPErrors which are automatically
rendering JSON errors and the given statusCode.