Fixes bit-fiddling issues with node label field

Node labels are stored in their respective node records. If all labels can
be compacted and inlined into the node record itself (5 bytes) then so be it.
Otherwise it will spill over to a dynamic record. There is some bit-fiddling
involved in doing this and there were a couple of problems thereabout:

o The limit for how big (position of msb) an inlined label id could be was calculated
  wrongly where an int could be shifted more than 32 steps to the left,
  overflowing. Had that value be a long from the beginning to prevent that.
o Reading the 5 bytes that make up the label field and combining those
  requires reading one int and one byte. If the byte was negative it would
  incurr lots of bits unexpectedly set to one when expanded into a long.
o Reading a node command might leave a node record which referred to
  labels in one or more dynamic records as marked as heavy even if that
  node already had references to dynamic records, changed in a transaction,
  but had no labels on that node changed within that same transaction.
  Now defensively only marks as heavy if there were one or more dynamic
  records provided when providing the record object with the label field
  value. This would give the opportuniy to load the dynamic records the
  next time that record would be ensured heavy.

All the above problems have been fixed.