Bitstring, "char" type, parameter fixes.

This is based on pull request #362 and implements the following:

* BitString are now correctly returned from backend, and is correctly handled in parameters.
* BIT(1) maps to the .NET bool type and other BIT maps to BitString.
* Output parameters now work correctly for prepared queries.
* DbType.Time is now mapped to interval.
* The "char" type now returns a Char instead of a String.
* Type OIDs are sent in the Parse message.
* Optimizations when all format codes are the same in Bind message.
* Automatically infer parameter value types when setting a value.
* New NpgsqlDbType.Unknown that specifies that Npgsql should not try infer the value type, nor cast the value when written to sql, but simply write a literal string in text form.
I'd like to, but if we strive for zero allocation that is not an option.

That example would make at least 7 allocations.
3 enumerator objects.
2 lambda function objects that contain captured variables.
ToArray doesn't know in advance how many elements to put in the array, so
it creates a buffer which size is doubled and copied on overflow and
finally copies all elements to a new destination array.
We also get function call overhead.
Den 21 okt 2014 10:41 skrev "Shay Rojansky" <notifications@github.com>:

> In Npgsql/NpgsqlCommand.cs:
>
> > @@ -423,32 +423,78 @@ void PrepareInternal()
> >
> >              _preparedCommandText = GetCommandText(true);
> >              NpgsqlRowDescription returnRowDesc = null;
> > +            ParameterDescriptionResponse parameterDescription = null;
> > +
> > +
> > +            var numInputParameters = 0;
>
> This code should probably be Linqified, something along the lines of:
>
> var parameterTypeOIDs = _parameters
>     .Where(p => p.IsInputDirection)
>     .Select(p => p.TypeInfo.NpgsqlDbType == NpgsqlDbType.Unknown ? 0 : _connector.OidToNameMapping[_parameters[i].TypeInfo.Name].OID)
>     .ToArray()
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/npgsql/npgsql/pull/390/files#r19135562>.
>