Cleanup of exception handling in network REST API plugin

Cleans up exception handling in the os-network API plugin so
that rather than very generic catching of exceptions, we only catch
those that we expect can occur. Adds new test cases where appropriate,
though some of the exceptions already had testcases.

Change-Id: Ie25f0cc60d157e259463a9e00c5639a09a869fce
Merge "Cleanup of exception handling in network REST API plugin"