Respect DEBUG environment variable when building
Add support for streaming on PostgreSQL 9.2 using PQsetRowProcessor

PostgreSQL 9.2 adds a new libpq function called PQsetRowProcessor
that allows the application to set a function that is called with
every row loaded over the socket.  This is different than the
standard PostgreSQL API, which collects the entire result in
memory before returning control to the application.  This API
makes it possible to easily process large result sets that would
ordinarily not fit in memory.

Integrating this API into sequel_pg wasn't simple.  Because you
need to set the row processing function before execution of the
query (and unset it afterward), the dataset needs to pass
additional information to the database, indicating that streaming
should be used.  It captures the block given to fetch_rows and
passes both itself and the block to the database.

Because part of the libpq API is tied to row+column indexing into
the result set (PGresult), that part can't be reused by the row
processing code.  So I had to add spg__rp_value, which is sort of
a duplicate of spg__col_value, but using the row processing API.
spg__rp_value is probably not going to be as fast, as the row
processing API doesn't use NUL terminated strings, so in many cases
spg__rp_value has to create a ruby string where spg__col_value
does not.

The column info parsing can be reused between the regular and
row processing code, so split that into a separate function called
spg_set_column_info.

Because sequel_pg needs to work on older libpq versions, add a
have_func call to extconf.rb to determine if the row processing
API is available.  If it is, Sequel::Postgres.supports_streaming?
will be true.

The libpq row processing API supports passing information to the
function via a void* API.  To make memory management easy, a
C struct is initialized on the C stack and a pointer to it is
passed to the row processing function. Control is yielded to the
block, with an ensure block to unset the row processing function
when the block completes (or raises an error).  So the row
processing function should only be called when the memory
referenced by the pointer is valid.  The row processing function
is reset to the standard one before the C function returns.

This code needs the master branch of Sequel, since it overrides
the new Database#_execute method in the postgres adapter.  The
reason for that refactoring was to enable streaming to work
easily with prepared statements.

Currently, streaming is disabled if you attempt to use the map,
select_map, to_hash, and to_hash_groups optimizations.  In all
of these cases, you are returning something containing the entire
result set, so streaming shouldn't be important.  It is possible
to implement support for streaming with these optimizations, but
it requires a lot of custom code that I don't want to write. As
it is, I had to add special support so that streaming worked when
the optimize_model_load setting was used.

Streaming is not enabled by default.  You have to specifically
require sequel_pg/streaming, then extend the database instance
with Sequel::Postgres::Streaming, then call Dataset#stream on the
dataset you want to stream.  Alternatively, you can extend the
database's datasets with Sequel::Postgres::Streaming::AllQueries,
in which case streaming will be used by default for all queries
that are streamable.
Include streaming file in the gem, and update README