Fixes duplicated names in alarm time constraints

Currently, an alarm can have multiple time constraints
with the same name. Consequently the constraints aren't
uniquely identifiable and cannot be edited correctly.

This patch adds duplicate checking.

Change-Id: I6654e13b249db53c2107b43fe36ddacedf67be67
Closes-bug: #1293994
Fix validation error for invalid field name in simple query

The field name validation code runs only in case of the operator that is
specified for the invalid field name, is 'eq'. Otherwise the validation
ends with an invalid operator error. The field name validation code was
modified to check the field name first and only checks the operators for
valid field names.

Closes-bug: #1294628
Change-Id: Id34ae882940b36dec3ea81043b0d29b996a38426
Merge "Fixes duplicated names in alarm time constraints"