Fix error handling in ParseValue.

The introduction of ApiErrorReporter broke the ParseValue module.
This went unnoticed because we didn't have any tests for this module.

This patch fixes the issue and adds tests. Note that the way
parse errors are reported changes (again) to be compatible
with the general error reporting format defined by ApiErrorReporter.

Change-Id: I5d80a6d7abe9315fb78c8b542f3044e63580ab99