Move _validate_int_value controller func to utils

This patch moves the _validate_int_value private method of the servers API
controller (intorduced in change
I18ac285d5b3c8200d7706c7d577809b15d6ab9e8) to utils, in order to make it
usable by code outside of the controller class. This method is very
general - it checks weather an input is a valid integer.

It also changes what exceptions it raises from HTTPBadRequest to
InvalidInput - all in the spirit of being more reusable.

Finally, it adds tests and fixes a small string formatting bug that was
uncovered by adding them.

Change-Id: I65f2b6474d572ed601d20dca9dda9936d306a219
blueprint: improve-block-device-handling
Merge "Move _validate_int_value controller func to utils"
Merge remote-tracking branch 'm_src_repo/citrix-fixes' into build-temp