Attached are 3 patches to extract the HTTP api as in its own folder/app.
First patch  is moving couch_httpd* in their own application named couch_httpd and make sure tests still pass.
Second  is moving #httpd record in couch_httpd/include/couch_httpd.hrl instead having it in couch_db.hrl.
The third  one create a couch_changes applications (extracting couch changes API from couchdb & couch_httpd applications to remove any circular dependancies and make sure couchdb doesn't use #httpd record. Also by doing this it allows to manage couch_changes API more consistant and usable by other couchdb applications.
All tests pass.