MT#5255 API: use local time for timestamps.
MT#5255 API: Create roles for resources.

Collections and Items have common functions (e.g. hal_from_xxx),
so move them into separate roles.