Add new optimizations based on Guice fork (see https://github.com/stephanenicolas/google-guice for details). Updated after @emmby review.