Upstream from imvu again

Some long-awaited changes from @chadaustin based on research and work that I did. These pass the embind tests in the public tree.