Use an inline cache when accessing Application.injector

Improves application performance by 3-5% in some benchmarks.
Merge pull request #3649 from richdougherty/app-inline-cache

Use an inline cache when accessing Application.injector