restapi: Implement custom properties using elements

There exists an implementation where the key, value and validation
regular expression are stored as attributes; this adds a different
implementation, where they're stored as elements, which might be more
flexbile in the future, e.g. if multiple values per key should be
supported.

Change-Id: I03173b72b4f9ab2906ca9a2989d6115efcb19264
Bug-Url: https://bugzilla.redhat.com/1071872
Signed-off-by: Lior Vernia <lvernia@redhat.com>