Add a LICENSE and fix the build.

This is the three-clause BSD license, indicating that the code is free to be used, as long as the copyright notice is retained and the names of the development team may not be used for promotion without permission.

Also, a missing inclusion was added: the code calls getWarnings() at a certain point, a function that returns a sql::Warning. This header is required for that.