Protocol version <= 22 compatibility mode + clean new client init

This pull contains multiple dependent changes
1) Don't use TOSERVER_RECEIVED_MEDIA message as client ready because it's not consistent used in old clients. Therefore old clients can't benefit from these changes anyway.
2) Make client use proper state handling too
3) Make client tell server about it's version (version is used for informational reason ONLY)

Second commit (optional)
make all the information available to lua mods.