restapi : malformated guid's cause http 500 (#902242)

When malformed Guids are passed in post data for action
the backend throws an internal error.

This patch moves MalformedIdException to restapi-types and
throws the exception if any invalid guids are passed.

Change-Id: Iebce833327654e1635632fb4a00ca8a3cf14fab5
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=902242
Signed-off-by: Ravi Nori <rnori@redhat.com>