fix issues with ranch

couchdb has a tendancy to exit from anywhere (old mochiweb design). Make
sure we can really recover from crashes by returning ok when it happen.
We still have some logs due to ranch  but that better than the old
situation.

side note: we are now based on latest stable branch of ranch.