Implement typeof optimization

Close #98. This is enabled behind the flag, legacy : false.
If you would like to enable this optimization, you need to specify
legacy: false option to esmangle.optimize