Check if the alarm has time constraints field before displaying

Fixes the bug that broke the alarms CLI if the alarm didn't have
a time constraints field.

Reduces code duplication of alarm printing code, so now all the alarm
printing code is actually tested.

Renames some auxiliary methods for more clarity.

Change-Id: Ib691b4a5a6cf5ae133cd0a5576f90e4d0d189a92
Closes-bug: #1316390
Merge "Check if the alarm has time constraints field before displaying"