Report 500 status via an APIError.

Previously, node_power_cycle was the only api call making use of the
ability to return a status code. This patch defines an APIException to
use for that purpose, and removes the ability to return a status, which
simplifies the request handler a bit.
Add unit tests for haas.http.

There are some infrastructural classes in here that should probably get
moved to test_common or the like; in particular I wrote
HTTPEquivalenceTest with exercising the real api functions in mind.
Merge pull request #281 from zenhack/http-tests

Http tests