layers: Pass unique error codes through descriptor validation
Descriptor validation builds up error strings at multiple levels such as
UpdateError->WriteUpdate->BufferUpdate->BufferOffset. The final error is
then reported via a log_msg() call at the top level.
In order for this design to allow for the new unique error codes, we need
to pass error codes down the chain in the same way we pass error strings
down the chain.
This change adds error msg passing for descriptor updates. Many error
codes are added in as well as comments for codes that are missing or need
to be updated.
The database file is also updated to account for all of the checks that
were updated and/or reviewed.