Add bounding polygon function for use in determining spatial extent

It might be possible to eliminate this 'result' temporary, by using 'return query execute' which is the corresponding syntax support to 'return query' except for dynamic statements.

http://www.postgresql.org/docs/9.1/static/plpgsql-control-structures.html