npm install - no compilation required

Currently when using npm, sqlserver.node must be created by compiling the
extension with node-gyp.

This commit adds an installation script that downloads the appropriate
sqlserver.node file from Microsoft at installation time.

Supports node.js 0.6.x and 0.8.x versions on ia32 and x64 Windows.
Visual C++ 2012 (Express) compile support

Added <memory> for shared_ptr and unique_ptr support in Visual C++ 2012.

Thanks to Brian-Cole for diagnosing this.

Fixes #99
Fixed: Dates before 1970 with time of midnight incorrectly inserted

This is especially onerous because the default time for a date is midnight.

Tests have been added to verify that dates with a time of midnight are
inserted and retrieved correctly.

Fixes #85
Fixes #103
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
Merged conflicts.