Handle session timeout in the VMware store

The current implementation can lead to session timeouts. This
will occur when accessing the datastore directly through HTTP.
This patch provides a retry mechanism by recreating the session
when getting a 401 status code.

Change-Id: I54cc9e30c9bc374a2cf82dec4beb9b06594835f8
Closes-Bug: #1311960
Add task functions to v2 registry

If local changes are made to run the v2 functional
tests with the v2 registry enabled, and the tests
are then run with:

$ ./run_tests.sh glance.tests.functional.v2

all tests pass except for 'test_task_lifecycle'.

This test fails because the v2 registry does not define the
'task_get_all' or 'task_create' functions.

With these defined the tests pass when run with the v2 registry enabled.

This is a prerequisite to running the v2 functional tests with the
registry enabled.

Change-Id: I588af10105b19087d06f7f13a6f75523595d4a23
Closes-Bug: 1308419
Merge "Add task functions to v2 registry"
Merge "Handle session timeout in the VMware store"