Fixed a bug regarding reading payload IDs.

The way payload IDs were being decoded was confusing. It has been rewritten with an abstraction layer to properly decode payload IDs.
Merge branch 'ohmage-2.16' of github.com:cens/ohmageServer into ohmage-2.16