Add License info and update README

Added a copyright and license header to each source file.

Renamed LICENSE.txt to just LICENSE.

Modified the LICENSE file to be more terminal friendly
by wrapping at 80 columns.

Updated the README to include running tests and remove no longer relevant
instructions.
Row count returned in result set for INSERT, UPDATE and DELETE

When a query results in no rows (no metadata), the rowcount property
is returned instead.

This is meant for cases using INSERT, UPDATE, and DELETE that don't
return results, but return a row count instead.

In both cases the meta property is returned, and can be used to
determine if rows or rowcount is present.  meta is a null when
rowcount is returned.

When rows are returned, the rowcount isn't returned because most
of the time it's -1, which is essentially useless.

When (non forward-only) cursors are properly implemented, it is
likely that rowcount will be returned with rows, though meta may
be updated to reflect that the results are scrollable too.

To clean up the code a bit, accessors were written for ResultSet
instead of allowing direct access to the data fields.

Microsoft Internal Review Id: jaykint-0b08af06923442ef826863e67233e2e2
Merge branch 'master' into develop
Error handling in correct priority

Error events were being emitted prior to callbacks being called.
However, if a listener wasn't available, then events.js turns the
error into an exception and throws it.  This is confusing for two
reasons:

1) callbacks were being skipped, and
2) the throw originated from events.js, confusing since the error was in
node-sqlserver.

The new flow is:

1) callbacks handle errors first
2) if no callback, then an event is emitted if there is a listener
3) an exception is thrown by node-sqlserver directly

Test added to make sure that errors are processed correctly.

Microsoft Internal Review Id: jaykint-e4773b6e93d94241b433198da41aa2c4
Contributors attribution

Added the phrase "and contributors" to all copyright notices to
recognize the copyrights of contributors to the product.

Added the CONTRIBUTORS file.  This file contains a list of
entities (people and companies) that have contributed to the
development, testing, and documentation of this module.
Failsafe for sqlserver.node native module require

Use the local sqlserver.node if present, otherwise fallback to the
one in the build directory.  If that fails, then throw an exception.
Removed mocha config option

Mocha will always be installed to the same spot as per package.json
Add Einar Otto Stangvik as a contributor
Updated legal header on new file
Multiple result sets supported

When several queries are batched together, return each query's results
separately.

If a callback is passed to the query function, the callback will be called
once for each result set.  A new flag, more, has been added to the passed
parameters to a user callback, so that a callback will know if more is coming
or not.  This can be used to close the connection if no more results are
coming.

When events are used, the events are called in succession multiple times: meta
once for each result set, row for each row, column for each column in a row.
The done event is called only once when all result sets have been processed.

TODO: Should we add a new event for a finished result set before starting the
next one?

Tests added for multiple result sets.

Fixes #16
Fixes #21

Microsoft Internal Review Id: jaykint-d1488f1ee64d4e4f85629b403cf78f54
SQL Server Bit columns returned as Javascript boolean values.

Metadata updated to return 'boolean' as type when retrieving bit
column.

Test added.

Fixes a portion if issue #4.

Microsoft Internal Review Id: jaykint-6c2184b1b6dc497ca9b16ab92d3d47d8
Revert "SQL Server Bit columns returned as Javascript boolean values."

This reverts commit 26969f26a9fa23495ffd86593d667977e68edd9c.

Line ending changes made relevant changes difficult to see.
SQL Server Bit columns returned as Javascript boolean values.

Metadata updated to return 'boolean' as type when retrieving bit
column.

Test added.

Fixes a portion if issue #4.

Microsoft Internal Review Id: jaykint-6c2184b1b6dc497ca9b16ab92d3d47d8
Handle SQL_NO_DATA returned by SQLExecDirect

SQLExecDirect returns SQL_NO_DATA when a statement generates no
results.  We treated this as an error, but the attempt to retrieve the
error message would fail on an assert.

Test added.

Fixes issue #5

Microsoft Internal Review Id: jaykint-d0234bd35f4a42589ac548e73858875
OdbcException.cpp: fix assert on NOT NULL schema countraints violation

Reproducing the issue:
---------------------
assert is raised when column 'id' on table 'test' does not "Allow Nulls"
when the following statement is executed:
  INSERT INTO test ( [id] ) VALUES ( NULL )

Fix:
---
The fix raises an ODBC Exception "No available diagnostic" when SQLGetDiagRec() does not succeed.

Explanation:
-----------
SQLGetDiagRec() can fail if there are no, or no more, diagnostic messages available as
there can be zero or more diagnostic message available.

For more information on SQLGetDiagRec() check the following ressources:
- SQLGetDiagRec  : http://msdn.microsoft.com/en-us/library/windows/desktop/ms716256(v=vs.85).aspx
- SQLGetDiagField: http://msdn.microsoft.com/en-us/library/windows/desktop/ms710181(v=vs.85).aspx
ignore lib/sqlserver.node
Handle SQL_NO_DATA returned by SQLExecDirect

SQLExecDirect returns SQL_NO_DATA when a statement generates no
results.  We treated this as an error, but the attempt to retrieve the
error message would fail on an assert.

Test added.

Fixes issue #5

Microsoft Internal Review Id: jaykint-d0234bd35f4a42589ac548e73858875

Conflicts, Resolved:

	test/query.js
Merge commit '5fd28218ab4f2b444df7845c6f63a5e162e8cd29'

Conflicts:
	src/OdbcException.cpp