Better readonly support

This PR is actually still a work in progress, just so nobody has to duplicate my efforts. It addresses #61, but there are still other readonly bug. For example, if a tab has "readonly" specified to true, only some if its children maintain the readonly status, while others don't. I suspect that in order to do this more elegantly we may need to refactor a little bit of the traversing logic (or maybe I just need to understand it better).

Please let me know what you think so far!