Implement PrintToConsole function for cleaner logging in NaCl and NPAPI.
Greatly simplify MathLog.