physics, parser: advanced ctrl sync, simplifications

We now wait for the control thread to do its job before continuing. And I made the silliest function ever. Also simplified the nullswitch method for the Lua parser. And fixed a bug where read_id didn't care about nullswitch and shat on object 0. I guess we didn't care about that back when we indexed stuff from 1.