Port v2 images extension to work in v2.1(v3) framework

Ports v2 images extension and adapts it to the v2.1/v3 API
framework. API behaviour is identical with the exception
that there is no support for XML. Also

- unittest code modified to share testing with both v2/v2.1
  where appropriate
- Adds expected error decorators for API methods

Partially implements blueprint v2-on-v3-api

Change-Id: I7b15a56f41612e3bbf5d59c3ad44fd32386ff315
Merge "Port v2 images extension to work in v2.1(v3) framework"