Remove old deprecated functions
Deprecate __FILE__ in favor of __DIR__ or __ENV__.file
Cache the environment for function definition

This speeds up compilation and reduces memory consumption. For
example, Ecto test suite consumes consistently 30% less memory
and loads 20% faster.