Add support for custom bit layouts in the id generator.

Changed the internal layout to be a bit more configurable where it
is possible to make id generators that have variable length epochs,
worker ids and sequences.

Note: The default behaviour and ids generated by the id generator is
unchanged.