Log errors from mongo, don't die

The code used to die from a mongo error.  Now it just logs it and returns a 500.

Also, depend on new version of go-common and update defer'd Close() of hakken to check for the error and panic if it happens

@jh-bate @kentquirk 
Whether or not the first element has been seen.

This is used for two things:

1. To generate commas between objects in the JSON array (and not generate one after the last element)
2. To determine if anything was written out to the response, in which case it was probably because of either an error or nothing was there.  If we have already written something, we just close up.    If we haven't written anything, then we write the correct response code depending on if it was an error or just nothing existed.