On rebuild check for null image_ref

While parsing the body passed in a rebuild request there is no check to
ensure that image_ref is not None.  This leads to a raised exception and
500 response by the API.

Change-Id: Ic9e51a761d0c1f30d55f4a167c876a6aa4f00a41
Closes-bug: 1312278
Merge "On rebuild check for null image_ref"