Handle NotImplementedError in server_diagnostics v3 api

In libvirt driver, it doesn't implement the function of
get_instance_diagnostics().it returns http 500 error No.
we expect http 501 if the function is not implemented.

Change-Id: I59bfaa27b96284bd56917096e0c3fab0d277ba96
Closes-Bug: 1349680
Only get image location attributes if including locations

Commit 155eeabbfafd4f48b47fea5b403f61a6e5c28426 added 'direct_url' and
'locations' to the list of attributes to get from an image which makes a
call back to glance if the attributes aren't on the image, and can
result in a 404 if they aren't available, which would be in the glance
v1 API case.

This change simply passes the new include_locations parameter down to
_extract_attributes so we can do the proper filtering.

Change-Id: I903fa5c781fed52183b340dc3d9bc4b6598b21ce
Partial-Bug: #1351333
Merge "Only get image location attributes if including locations"
Merge "Handle NotImplementedError in server_diagnostics v3 api"