Fixes template not using the JSON or YAML format

An internal unexpected exception is raised while validating a template
which only has string content. We should handle the case and raise the
correct error message such as "invalid format" and to tell the template is
not using the JSON or YAML format.

And modify incorrect version name and version date in this patch.
And change "template" from global variale to class varialbe in
test_api_cfn_v1.py. (missed in another patch which this patch
depends on: Change Idc2ba2b9 by misoperation)

Change-Id: I46ee8c48e3ddae71be061cfda0c029d86d132684
Closes-Bug: #1267379
Merge "Fixes template not using the JSON or YAML format"