I provided a way for clients to easily see MAX_DEVICES by setting a property on the root window to contain the value.
I also increased MAXDEVICES from 40 to 256 to mitigate bugs like 64793.
Closes #658