Sync with noVNC as of commit ae510306b5094b55aa08a2a0d15a151704f70993. The main change is to make it a more proper object that you can instantiate multiple times.