[Codeplex #1853]: Delete TransientFunction and TransientAction

Summary of this changeset:

1. Remove the TransientFunction and TransientAction functions
2. Remove the IsAlwaysBindable, AlwaysBindable
Fix for codeplex #1996 - Nullref on 404 with webapi batching

The issue here is that one of the requests in a batch was matched by an
MVC route when running in web host.

The batch handler uses HttpServer to invoke the individual requests.
Internally the HttpServer forwards the request to an
HttpRoutingDispatcher.

In the web host case, the HttpRoutingDispatcher has a reference to
HostedHttpRouteCollection - which is implemented by matching BOTH WebAPI
and MVC (System.Web) routes. If an MVC route matches, then the produced
IHttpRouteData instance doesn't have its .Route property set as the
underlying route that matched does not implement IHttpRoute.

This causes attribute routing in the controller selector to fail, as we
did not anticipate this case.

Followup filed to consider whether or not this is the right behavior for
the dispatcher/route-collection.
[Codeplex #1985]: Make the internal constructor as public in
BoundActionPathSegment
Issue 1594: DefaultODataBatchHandler doesn't handle urls relative to the
batch endpoint properly.
The root cause is that the base uri of ODataMessageReaderSettings doesn't
end with slash.
The fix is only for v3 and v4 works well for all kinds of urls because
ODL v4 will append a slash in the end of the base uri if there isn't one.
Issue 1941: Parameters Property of SingleEntityFunctionCallNode should
never be null
It is fixed in ODL 6.4
https://aspnetwebstack.codeplex.com/workitem/1941
Issue 2003: ODataBatchHandler should contain more common helpers
https://aspnetwebstack.codeplex.com/workitem/2003
Issue 1648: [ODataAttrRouting]Invalid route templates are not identified until a request matches an Odata route
Throw exception for invalid path template while initializing the
configuration
https://aspnetwebstack.codeplex.com/workitem/1648
585: Optimize Razor output rendering to avoid LOH allocations

Instead of creating a string from the StringWriter (_tempWriter)
we will copy the underlying buffer in chunks to the output text buffer.
For large pages this both reduces the total allocations to 1KB as well
as avoid getting into the large object heap.
Stylecop fixes
Add `ModelMetadata.HtmlEncode` property
- use new `ModelMetadata.HtmlEncode` property in HTML helpers
 - conditionally in default HTML display and editor object templates (e.g.
   `@Html.DisplayFor()`) when value is non-null and the template is invoked
   with template depth greater than 1
 - unconditionally in `@Html.DisplayText()` and `@Html.DisplayTextFor()`
- test new property and its use

Also test `DisplayTextExtensions`
- unit test gap
Merge branch 'v3.2-rtm'
[Issue #2047] config.EnableQuerySupport() causes errors in Web API OData 5.2 (v3)
https://aspnetwebstack.codeplex.com/workitem/2047

Given an app that has actions attributed with QueryableAttribute, if that
application also uses config.EnableQuerySupport() it will make the actions with
QueryableAttribute fail. config.EnableQuerySupport() adds an EnableQueryAttribute
to the collection of global filters, which causes the action to have two filters
applied: EnableQueryAttribute and QueryableAttribute.

The fix is to check for instances of QueryableAttribute applied to the action or
to the controller when the user calls config.EnableQuerySupport or
config.AddODataQueryFilter without providing an explicit IFilter instance.
In those cases we avoid applying the EnableQueryAttribute to the action globally.
(The filter on the action/controller will still be applied as expected).

If the user used a custom query provider to plug in the QueryableAttribute,
this issue won't apply when updating from 5.1 to a later version as the only
attribute that can be used in 5.1 is QueryableAttribute.

When a customer updates to 5.2-5.3 and provides a custom QueryableAttribute instance to
config.EnableQuerySupport, if he updates his custom QueryableAttribute instance to use
EnableQueryAttribute, he also needs to update all the actions that use
QueryableAttribute on his application to use EnableQueryAttribute to avoid a similar issue
with conflicting filters on such actions.
Update ODL to 6.5

Fix test cases in webapi.odata to take ODL fixes:
Bound action advertised in payload is with cast to the type defining the
action.
ODataUnrecognizedPathException error string change.
Navigation link is built upon read link, instead of edit link.
[Codeplex Feature #1896]: Support Open (dynamic) colletion property at
open type.

1. Support the open entity type and the CRUD of open entity type.
2. Support the collection of primitive, complex and enum type as the
dynamic property
Move OData src and test projects under OData folder

Create an OData folder under aspnetwebstack.
The folder contains:
src
    System.Web.Http.OData: v3 (moved from aspnetwebstack/src)
    System.Web.OData: v4 (moved from aspnetwebstack/src)
test
    System.Web.Http.OData.Test: v3 (moved from aspnetwebstack/test)
    System.Web.OData.Test: v4 (moved from aspnetwebstack/test)
Build OData folder

Add build related files etc. to OData folder:
    build.cmd
    WebApiOData.msbuild
    WebApiOData.sln
    .nuget
    tools
    src
        Common (some depending files, e.g., for Error.ArgumentNull)
        CommonAssemblyInfo.cs
        GlobalSuppressions.cs
        Settings.StyleCop
        Strict.ruleset
    test
        Common (ContextUtil.cs, MediaTypeFormatterTestBase.cs)
        Microsoft.TestCommon (a .csproj contains xUnit ref, Assert etc.)
        Settings.StyleCop

Change project references to nuget ref:
    System.Net.Http.Formatting
    System.Web.Http
    =>
    src packages.config:
      <package id="Microsoft.AspNet.WebApi.Client" version="5.2.0" targetFramework="net45" />
      <package id="Microsoft.AspNet.WebApi.Core" version="5.2.0" targetFramework="net45" />

    test packages.config:
    +  <package id="Microsoft.AspNet.WebApi.SelfHost" version="5.2.0" targetFramework="net45" />

Remove OData src and test projects from Runtime.sln and repositories.config

Build succeeds, all test cases pass.
[Codeplex issue #2027] [Required] attribute doesn't work on a property of
Complex type.

Actually, all property conventions should be re-applyed to the new
property if the entity type reconfiged to complex type.
Codeplex #2033 : If-Match and If-None-Match should support value "*"
Dollar Count Support in WebAPI
Add media type mapping, serializer support,
count path segment and routing convention support
Add NotCountable limitation on Property