Backport recent changes in trunk to the mathtex branch.
Also remove the wx mathtex example on account of also belonging in mathtex.
Creating a branch for mathtex integration.