Improve unit tests for glance.api.middleware.cache module

Add tests for glance.api.middleware.cache module

Fixes: bug #1152053
Change-Id: I6e99c70b0d8ae20011b4ad9bea76d5e4e1dff921
Merge "Improve unit tests for glance.api.middleware.cache module"