CountCheapula: For Work Item: 1089 Performance enhancement for EntityAdapter.IsStateManagerDirty method

This is a contribution from IDisposable to replace uses of GetObjectStateEntriesCount and GetObjectStateEntries with a new method HasChanges that doesn't bother getting or counting any entries but just returns true as soon as it is known that there is something that needs to be saved.
Migrations: Log messages raised by the Sql(Ce)Connection.InfoMessage event

Problem: Bug #1216 identified a problem in that command execution warnings generated by ADO.NET providers are not surfaced in the default migrations UX.
Solution: Updated the logging decorator to capture warnings during command execution. Unfortunately, the InfoMessage event used to intercept warnings is not part of the ADO provider surface, so I had to add surface to our provider model to enable hooking the provider specific event.
Made mapping API internal and exposed them to designer with InternalsVisibleTo
Reverting breaking change to IDBSet.Local

Work item: 1205
Making some conventions more extensible.

Workitem: 731
- Added ability to IndentedTextWriter to cache indentation string so
we don't incur massive string-allocations for white-space. Explicitly
exposed the forced culture (InvariantCulture) so users won't guess
wrong if passing in their own TextWriter.

- Made SqlWriter simply inherit from IndentedTextWriter so it could
benefit from the caching and migrated the "only a new-line" logic
down to IndentedTextWriter for consistent emission of indentation.

- SqlStringBuilder now exposes the InnerBuilder for use when we would
be just making a StringBuilder and passing it to Append later. This
allows the underlying to be used without constant newing of new
builders, and also allows TextWriters (particularly
IndentingTextWriters) to just append directly.

- DmlSqlGenerator now wraps the _commandText.InnerBuilder to
eliminate newing up a StringBuilder and copying of strings by
writing directly into the _commandText.

- Eliminated the sqlCE's need for AppendFormat on the
sqlCE version SqlStringBuilder, just for some concatenation.

- SqlServerMigrationSqlGenerator, CShareMigrationCodeGenerator,
and VisualBasicCodeGenerator use the writer's CurrentIdentation
method directly (again to benefit from the cache).

(at this point, I think we should move IndentedTextWriter,
SqlWriter, and SqlStringBuilder into EntityFramework proper)
Changed expected strings to match new indentation (should probably be less fragile tests)
Per pull-request review:

- Remove HardTabString and "\t" where used.

- Renamed AppendKeyWord to AppendKeyword and removed CodeAnalysis message suppression.

- Added newly needed CodeAnalysis message suppressions.

- Reduced fragility of unit test by collapsing whitespace.
Restoring correct indentation of SPROC bodies in generated migrations
Ran code cleanup.
Removing AsStreaming extension generic constraint
Removing null check for server name in ExecutionStrategyKey constructor
Adding a constructor to SqlAzureExecutionStrategy

Work items: 1164, 1166, 1201
Migrations: Fix for #1216 - History table warning when scripting

Problem: After adding ContextKey to the PK of the history table the combined PK length was greater than the SQL Server allowed maximum (900 bytes).
Solution: Reduce the total size of the composite PK to not exceed the 900 byte limit. Ensure that we enforce migration id max length at creation time.

Work Item: 1216
CodePlex #677: TPT to TPH - can not use the same name properties in
different hierarchies.

Scenario:

A - table A
B : A - table B
B1 : B - table B
C : A - table C
C1 : C - table C
Y - table Y

B (Dependent) -> Y (Principal)
C (Dependent) -> Y (Principal)

Issue 1. The selector used in EntityMappingTransformer.GetDependentColumns
for destinationColumns returns two results because the Name and the
UnpreferredUniqueName are both matched, and results in exception thrown by
Single(). This happens because of the way the database model is
constructed from the conceptual model. Changed the selector to first
select by Name and if not found to select by UnpreferredUniqueName. This
solves the exception reported, but the model still doesn't load because of another exception that complains about the Discriminator condition.

Issue 2. The code adds the discriminator column	to the base type and the	condition properties to	the derived types. In ConfigureDefaultDiscriminator	the discriminator condition is removed if the entity type is not sharing the table with its base type. That results in incorrectly removing the discriminator condition for types B and C because they are not sharing the table with A, even though they are sharing tables with B1 respectively C1. Removed the check of isSharingTableWithBase because code in ModelConfiguration.RemoveRedundantColumnConditions is supposed to remove the discriminators when there is only one table using it. However that code calls StorageMappingFragmentExtensions.RemoveDefaultDiscriminatorCondition which did not seem to work.

Issue 3. Intent of code in StorageMappingFragmentExtensions.RemoveDefaultDiscriminatorCondition is to remove the single condition but the implementation fails to achieve that because of how the key is formed for the internal dictionary. To fix this I replaced that code with a call to ClearConditions.
Migrations: Fix for #1000 - Migrations: Support history context factory per provider

- Enabled associating a providerInvariantName with a HistoryContextFactory when registering factories in DbMigrationsConfiguration or DbConfiguration.

Work Item: 1000
Code First: Fix for #1235 - Code first sproc mapping: revisit RowsAffected parameter creation

Changes sproc by-convention metadata generation to no longer automatically generate rows affected parameters when concurrency tokens are present. EF doesn't actually require a dedicated parameter to perform concurrency checks - If none is present then EF defaults to the ADO.NET rows affected value returned by ExecuteCommand. Whether rows affected parameters are introduced is now solely controlled by the RowsAffected fluent API in MapToStoredProcedures.

Work Item: 1235