idmap: use UL for bitshift literals (LP: #1271284)

The current bitshift logic in idmap incorrectly uses
the literal 1 for the value to shift in idmap_alloc(),
idmap_take(), and idmap_alloc_next().  This causes the
resulting value to be an int instead of a long, which
results in the wrong bit being set once the number of
bits to shift operand exceeds sizeof(int).  Also
on some platforms, the behavior of the left bitshift
operator is undefined when this overflow occurs.
Merge pull request #51 from tonyespy/lp1271284

idmap: use UL for bitshift literals (LP: #1271284)