Simplify OptionalBinder implementation to not delegate to a MapBinder.
Instead, bind directly to annotated @Actual/@Default keys.  This is in
preparation for future improvements.

This contains two logical changes:
1) The error message for duplicate actual/default bindings is now the default Guice message, instead of a custom thing in MapBinder.
2) getDependencies now returns the live dependency (either the actual or the default, not both).  Also, Optional<Provider<T>> continues to return a dep to Provider<T>, but Optional<T> returns a dep of T directly.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70734332
Automated g4 rollback of changelist 70734332.

*** Reason for rollback ***

Broke a project.

*** Original change description ***

Simplify OptionalBinder implementation to not delegate to a MapBinder.
Instead, bind directly to annotated @Actual/@Default keys.  This is in
preparation for future improvements.

This contains two logical changes:
1) The error message for duplicate actual/default bindings is now the default Guice message, instead of a custom thing in MapBinder.
2) getDependencies now returns the live dependency (either the actual or the default, not both).  Also, Optional<Provider<T>> continues to return a de...

***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70738452
Automated g4 rollback of changelist 70738452.

*** Reason for rollback ***

Fix projects that were doing dependency analysis by returning a dependency on the Injector when run on raw Elements (instead of a dependency on @Actual+@Default, even though we didn't know which would really exist).

*** Original change description ***

Automated g4 rollback of changelist 70734332.

*** Reason for rollback ***

Broke a project.

*** Original change description ***

Simplify OptionalBinder implementation to not delegate to a MapBinder.
Instead, bind directly to annotated @Actual/@Default keys.  This is in
preparation for future improvements.

This contains two logical changes:
1) The error message for duplicate actual/default bindings is now the default Guice message, instead of a custom thing in MapBinder.
2) getDependencies now...

***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70742247
Wrap GcFinalization usage around wrappers that also await a ReferenceQueue.  I
couldn't get any failures internally in 10,000 runs even w/o these changes, but
on the external builds I reliably reproduced some flakes in 100 runs w/o this,
and no flakes (that I saw) afterwards.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70835114
Add support for OptionalBinder to link to normal bindings of that type if
neither setDefault nor setBinding are called.  From the javadoc, example:

* <pre><code>
* public class FrameworkModule extends AbstractModule {
*   protected void configure() {
*     OptionalBinder.newOptionalBinder(binder(), Renamer.class);
*   }
* }</code></pre>
*
* <p>With this module, an {@link Optional}{@code <Renamer>} can now be
* injected.  With no other bindings, the optional will be absent.
* Users can specify bindings in one of two ways:
*
* <p>Option 1:
* <pre><code>
* public class UserRenamerModule extends AbstractModule {
*   protected void configure() {
*     bind(Renamer.class).to(ReplacingRenamer.class);
*   }
* }</code></pre>
*
* <p>or Option 2:
* <pre><code>
* public class UserRenamerModule extends AbstractModule {
*   protected void configure() {
*     OptionalBinder.newOptionalBinder(binder(), Renamer.class)
*         .setBinding().to(ReplacingRenamer.class);
*   }
* }</code></pre>
* With both options, the {@code Optional<Renamer>} will be present and supply the
* ReplacingRenamer.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70835975
More flake fixing: don't assume methods come in a certain order.  Super strange
that this one never really flaked for us.  (It immediately flaked after I added
runs_per_test..)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70836577
Merge pull request #814 from google/moe_writing_branch_from_76be88e8140f77a25824f5deb67bb13b8e5dabc6

Merge internal changes to make OptionalBinder better & fix flakes.