Deprecate lcb_timer* and replace with lcbio_timer

lcb_timer has been deprecated before, but since we had a lot of internal
usages of it, we didn't actually mark it as deprecated to the
preprocessor. This commit replaces all usage of lcb_timer within the
internal code with that of lcbio_timer. The lcb_timer code itself still
remains but is now sectioned off in a single file (timer.c) and isn't
touched by anything within the library.

Change-Id: Ibfc05e2a0f2ee2ff8a5461988b426e56152e2666
Reviewed-on: http://review.couchbase.org/39215
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Call lcb_retryq_signal() when a new config has arrived

This will attempt to schedule all commands currently inside the retry
queue.

Change-Id: Id67b1debdbe4fc58736d31aa9c93848553d7c90e
Reviewed-on: http://review.couchbase.org/39255
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Fix scheduling in retryq

1) Next tick delta was being calculated as seconds _before_ now. This
   should be seconds after now.
2) First operation timeout should take into account the actual timeout
   rather than just its start time.

Change-Id: Ia5058fa91be337c95f79f2156925ebb0d4741b84
Reviewed-on: http://review.couchbase.org/39256
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Always include configuration.h in distribution

The script would previously include only the files which were found in
the 'include' directory. If re-running gensrclist.pl after a successful
build (which is what I often do in my environment) the problem did not
appear as configuration.h already existed. However running from a clean
tree the configuration.h file is never picked up.

The solution here, is to mention it manually :)

Change-Id: If1b99e76c5c5ffc102a83f5e2d864dd5c882da8e
Reviewed-on: http://review.couchbase.org/39257
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Restore dtrace hooks

This commit also rewrites a lot of the macros to play nicely with our
current command structure.

Change-Id: I9cd312a31c73ec605fff766ecc5a6188a87ded26
Reviewed-on: http://review.couchbase.org/39258
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Document pktfwd functions

Change-Id: Ib607ca328a05879c87aea9367af589e623ee6d21
Reviewed-on: http://review.couchbase.org/39276
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
cmake fixups (gtest_zip_path)

Change-Id: Ida7aa19665e72ec8539d2a02b9a5366901194bd4
Reviewed-on: http://review.couchbase.org/39095
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Document error codes more extensively

This adds proper error codes for each of the error constants (except a
few that aren't really used anywhere).

Change-Id: I1a7a29819f6a02b70172156c401e0356ed7d3947
Reviewed-on: http://review.couchbase.org/39277
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
RELEASE_NOTES: Properly encapsulate symbols in backticks

This allows the output to look nicer, and makes markdown less
confused when it finds an `_`.

Change-Id: Ib335728a2d256826a45e2e2fa3174e0a004e9fab
Reviewed-on: http://review.couchbase.org/39278
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
update release notes

Change-Id: I462987585a909a70a7d3ab0ce0e07762e17df719
Reviewed-on: http://review.couchbase.org/39187
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Doxygen formatting fixups

- Fix minor typos and comment syntax in header
- Disable top nav bar (we already have one on the side)
- Disable "Dynamic" sections - this allows the file size to be smaller
  and the load time quicker
- Disable "Search" functionality - this just generates a whole bunch of
  files, and it's nothing an index lookup can't solve

Change-Id: Ie6628d5ca876c2098986eff2c87d7501ef44a784
Reviewed-on: http://review.couchbase.org/39279
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
CCBC-405: Return error code if passed an empty key

Empty keys will result in the server giving us an EINVAL and confuse the
user. We should notify the user about this early on by supplying an
appropriate error code.

Change-Id: Ifd59293d8f5eea0304017859bff3aa2e80a70cb8
Reviewed-on: http://review.couchbase.org/39284
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
CCBC-458: Allow to disable configuration refresh on views error

This may be a bit annoying for some folks who are expectedly getting
not-found errors - for example when polling for a newly created view.
Perhaps we should make this the default?

Change-Id: I7891fa367e21ba8e94e37bc64fab75bd0cf04354
Reviewed-on: http://review.couchbase.org/39288
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Remove comment on top of release notes

This comment is intended for authors, not users :)

Change-Id: I4a029ef120fae20ac9b571bf997047078308c459
Reviewed-on: http://review.couchbase.org/39307
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reword section about hidden internal environment variables

Change-Id: I60aba436114b2cb34ed667bd8d3a1333f420a33e
Reviewed-on: http://review.couchbase.org/39308
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Provide cleaner way to generate documentation

This allows the documentation to be generated using a Makefile, with
defined but configurable locations for output.

This also allows the version to be injected into the output as well, so
that it can reflect the latest source version

Change-Id: Iebfde5d674b7da60f7cf899d925e38773e8a2e32
Reviewed-on: http://review.couchbase.org/39315
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Doxygen: Don't generate manpages

Unfortunately the current manpage output is lacking - we might re-enable
this in the future if nicer output can be generated. Note that this can
always be reenabled by the user by doing:

(cat Doxyfile; echo GENERATE_MAN=yes) | doxygen

Note that this does not effect the manpages for the command line tools,
only the programming APIs which doxygen generates by default.

Change-Id: I07e17a922ea8162fa4f63290953aa1e43b69b217
Reviewed-on: http://review.couchbase.org/39316
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Fix generated source packages

There were some issues in what got included when one would do a make
dist. The following files have been added or removed from the output of
make dist:
- Add probes.d file (needed for dtrace probes)
- Remove probes.h file (this must be generated at build time)
- Remove config.h file (overwritten by automake, but will break cmake
  builds from a new source tree)
- remove doc/manout (unused)

Additionally, to help us detect packaging errors, we run the make
distcheck command. The following changes were needed to allow make
distcheck to succeed:
- Add -I$(top_srcdir) - otherwise distcheck (which builds in a
  subdirectory) will fail.

Change-Id: Iae9c51404b3a3771e170e5b4b64205e17854b157
Reviewed-on: http://review.couchbase.org/39317
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
cbc: Only check for symlink invocation if argv[0] starts with 'cbc'

libtool generates an 'lt-cbc' which the code erroneously thinks is a
symlink invocation like 'cbc-version' or 'cbc-cat'

Change-Id: I0e32a5fc2ace41506beb62c98d11db64b48fdb9b
Reviewed-on: http://review.couchbase.org/39318
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Don't use special 'mc_test.cc'. Use the normal 'nonio_test.cc'

This just invokes the normal gtest suites

Change-Id: I76f150f104ac9228991d60326270f8c8b602ff45
Reviewed-on: http://review.couchbase.org/39319
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>