Handle non dict metadata in server metadata V2 API

While creating or updating the server metadata, requested metadata
should be in form of dictionary.
Currently if it is not in that form then, 500 error is being return
which should be 400.

This patch adds such request check for V2 API and adds its UT

Change-Id: Ifcd4f9d352de7b2676beff319b641547b8952566
Merge "Handle non dict metadata in server metadata V2 API"