Add support for lambdas

For IE <= 8 compatibility we are explicitly testing for functions now.
Alternatively we could use defineProperty to define properties backed by
getters, in which case none of this change is needed.

Performance even for the simple attribute case drops a bit with this change:
test1.js slows from 0.053s to 0.083s. This would be avoided with
defineProperty.