Pass errors from *_format.parse() to the caller

This gives the user a nice helpful error message, something like:

ERROR: Template not in valid format: while parsing a block mapping
  in "<unicode string>", line 2, column 3:
      KeyName:
      ^


Change-Id: I1c0aaa955981eec264e1ff3cc66ad15adc771e72
Closes-bug: #1226106
Merge "Pass errors from *_format.parse() to the caller"