Convert `term_to_binary` to `?term_to_bin`

* Replace `term_to_binary` calls that don't specify the
`minor_version` option with the `?term_to_bin` macro, which adds the
option `{minor_version, 1}`, to maintain backward compatibility.

* Define new `term_to_bin/2` in `couchd_db.hrl` for existing uses of
`term_to_binary/2`.

* Define `term_to_bin` in couch_epi.hrl since `couch_db.hrl` cannot be
imported into `couch_epi` modules.
21 files changed