Optimizations + Object.keys bugfix

'function' types have keys, too.

significant performance speedups on my machine for avoiding hasownproperty
http://jsperf.com/hasownproperty-performance-analysis/2