Fix build report parser

This adds an explicit distinction between required and optional fields,
so we don't get an error if the latter are missing.

Closes #226.
Add ToSElem instances for build report types