Add time conversion macros

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