Fix console completion crashes

There's a few ways to make the game crash via console completion:

* Try to complete on a non-table/non-userdata type.
* Try to complete on a read-only table proxy object (eg those used for anything under `Constants`).
* Try to complete on a table with non-string keys.

This fixes all of those.