Add _local_docs and _design_docs handlers

COUCHDB-1145
Repeating the same code with few variables 6 times isn't good imho.