replaced multiple closure with single object
replaced multiple closure with single object

* for http handlers
* using lager to handle json encoding failures

Signed-off-by: Tom Anderson <9ac51b7e88aa4ff625ec8c78fab1656dd3ee563c@pivotal.io>

cfmobile/brokerapi,pivotal-cf/brokerapi,pivotal-cf/brokerapi,drnic/brokerapi