Fixed: Date at end of a year trips an assert

When a date was near the end of a year before 1970, an assert would
trip because the day would be out of range of 0 to 30 (0 based day
within the month).

The day would be off because the time was being calculated after the
year was calculated from the day.  Moving this calculation forward
solved the problem.

Added a test to guard against regression.
Buffers JS objects now accepted as input parameters

They are bound as varbinary parameters.

Since Buffer object buffers are managed by V8 directly, we don't delete them as we
do other parameters we've copied.

Consolidated some error message code for parameters into a single function.

Added a small unit test to verify Buffers are being inserted correctly.

Also removed comments and minor code clean up.
Return the SQL Server data type and UDT classname in the metadata

Added a new field to the metadata, sqlType, that returns the datatype
as given by SQL Server (e.g., "varchar", "bigint", etc.)

When this type is "udt", an additional field, "udtType" is added that
contains the class name for the UDT type.  This can be used to see if
the type is a spatial type (e.g. "geography").

Also contain minor whitespace corrections (tabs to spaces).

Tests were updated to reflect the change.
UDT metadata mistakenly returns type of 'text'

The column values returned to callbacks are Buffers, so the metadata
should properly reflect that by returning 'binary' as the metadata
type.

Test updated to verify fix.

Fixes #117
Closed connection throws exception on further access

When a connection is closed, the connection object throws errors
when another method is called on that connection object.

Added a test to verify that the exceptions occur when a connection
is closed and another method is called.

Fixes #32
Connection is not closed prematurely until a query is complete

Closing a connection explicitly would close the connection immediately
rather than wait until ongoing operations were complete on that
connection.  The close operation now waits until all other operations
are finished.

Since there are legitimate times to forcibly close the connection
immediately, a new (optional) flag has been added to the close call:

conn.close( immediately, callback )

If the immediately parameter is supplied and is true, then the
connection will be closed rather than waiting for pending
operations/queries.  Note: if immediately is supplied but is not a
boolean, then an error is thrown.

close can still be called with either nothing or a callback as before.

Tests added to verify the new parameter.

Fixes #32
Connections closed when an error occurs using sql.query or sql.queryRaw

When sql.query or sql.queryRaw were called and an error occurred during
processing, the connection was not closed and would stay open for several
minutes until collected.  Now the connections are closed immediately.

Also added a try/catch around a user's callback for query and queryRaw so
if an exception is thrown, the connection is closed.  The exception is
then rethrown with additional information.

The try/catch will be upgraded to use domains in the near future.

Fixes #121
cast OnForeground to uv_after_work_cb

Without this directive, compilation fails with node 0.10.x
Fix bug for connection is null closing failure

When a connection fails to open, check for null on the returned
connection before attempting to close it.

Adding a test for connection failure handling
Merge pull request #122 from cravergara/patch-1

cast OnForeground to uv_after_work_cb
Merge pull request #1 from WindowsAzure/master

Update repository