Allow limiting length of document ID

Previously it was not possibly to define a maxum document ID size. That meant
large document ID would hit various limitations and corner cases. For example,
large document IDs could be inserted via a _bulk_docs endpoint but then trying
to insert the same document via a single HTTP method like PUT would fail
because of a limitation in Mochiweb's HTTP parser.

Let operators specify a maxium document ID length via the

```
couchdb.max_document_id_length = infinity | Integer
```

configuration.

The default value of `infinity` keeps the current behavior where document
ID length is not checked.

COUCHDB-3293
3 files changed
tree: 5e291b1fa2a509ec714a083723fdfb77841568bc
  1. include/
  2. priv/
  3. src/
  4. test/
  5. .gitignore
  6. .travis.yml
  7. LICENSE
  8. rebar.config.script