restapi : ints and shorts overflow

int and short values are overflown[1] before
they even reach the business code, allowing
for wrong values to be set.

Handles the case where negative values are passed
for unsignedInt and unsignedShort

Change-Id: I40115f1938a6263317d77ae2be0618d905e29664
Bug-Url: https://bugzilla.redhat.com/1000796
Signed-off-by: Ravi Nori <rnori@redhat.com>