Rewrite LOCI validator

Reviewer: @wilmo119

The validator checks object lengths when the message first comes in, so that each accessor doesn't need to. The old validator was incomplete and was the last user of most of the old of_g datastructures. The new validator is much more complete (missing a few things marked with TODOs) and uses the IR.