Split out couch_httpd

This is the first of many steps to correct the application dependency
tree.
Move couch_js_functions.hrl to the include dir

This should probably be ditched for proper priv resource files. This
move simply allows couch_httpd to find the header for oauth purposes.
Trim couch.app.src application dependencies
Make top-level repo an application

The top level repo should be what selects and pulls together the
indivual applications that make Apache CouchDB. The couch application
itself should become more of the engine that powers the core but does
not decide or determine what is built around it.

This is a start to moving away from the .ini driven boot process.
Dynamic application support is an interesting feature that might
belong but it's something that makes it hard to clean up the rest
of the code. Over time, more of that might be added back but first
a clean OTP-style boot and clean rebar based building and embedding
would be better trade-offs.

There will be follow up commits that move more code around as this
idea settles. Tests are currently a bit broken. These will be fixed
separately as well given how much separate work they will require as
is.
Add config.h temporarily

While I work out new configure scripts, it'll be nice to build
off of this repository.
Make the user.config optional

While this will always be generated by the configure script, it
should be optional for projects that decide to embed this repo
as a dependency.
Make Erlang happy about variable scope