Enforce value length

Disallow values longer than 520 bytes in the RPC commands name_update and name_firstupdate, and unify it with the value check in the Qt.  I've tested that this successfully prevents "stuck names" on test-net, but it would be good if someone independently confirms that 520 byte values are still ok while 521 bytes make the name stuck (and that the patch guards against this).