Enforce max value length 520 in RPC and Qt.

In the UIs (RPC commands and Qt), disallow setting a name's value to
longer than 520 bytes, since this is buggy in the backend.