JCBC-611: Improve readability of TranscoderUtils

Motivation
----------
Dealing with flags, bit shift operators and legacy flag vs common flag
specification is a non-trivial brain gymnastic. Improve readability of
code related to that in TranscoderUtils to make the spec more visible
and the different parts more explicit.

Modifications
-------------
Improved javadoc of the COMMON_FLAGS_MASK, added explicit constants for
LEGACY flags and rewritten initialization of COMPAT flags constants.

Reworked the hasCommonFlags method to only look at common flags bits.

Added a hasCompressionFlags method to correctly detect compression flag
in the future.

Reworked the hasXXXFlags to correctly detect each type of document.

Result
------
All tests pass and flag-related code is more readable and documented.

Change-Id: I3bb051d279a3a207028baa69763059bd98a5954d
Reviewed-on: http://review.couchbase.org/42609
Tested-by: Simon Baslé <simon@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>