Eliminate num_nodes on map? calls

This uses the knowledge of how many rows we just inserted to avoid a
sequential scan of tmp_nodes

Fixes pnorman/openstreetmap-cgimap#5
Merge pull request #22 from pnorman/num_nodes

Eliminate num_nodes on map? calls
Merge commit 'd6deddada7bfb1f4b271f85bcbafa52eb12c3c0c' into gsoc13
Make snapshot select_nodes_from_bbox also return an int