moused rlvmain, -ex and leash

Refactoring and optimize memory footprint. Fix broken "repeat
restrictions on region change", add "RLV_QUERY" and "RLV_RESPONSE"
messages for checking current rlv state, Add support for tracking
restrictions by script: use textString instead of key.