Implement basic name script parsing and construction.

Write routines to parse "name scripts" and to construct them for name
registration.  These also have a unit test now, but aren't yet used
anywhere in the main transaction logic.