ensure all required fields in SubmissionResult and nested objs are set

Fixed an issue with PYTHON_FUNCTION submissions - in the case
where the submitted function name wasn't the same as the
testname the TestResult message field was set incorrectly.

Added some fairly thorough sanity checks to ensure that invalid
SumbmissionResults won't be sent back to the webapp, even if
there are bugs in the builder that cause some fields to be
omitted.