Implement checking of name transactions.

Check Namecoin protocol rules for transactions.  The name database is
not yet updated as it should be, and there's no unit test for the checks
yet.