use psql to check for neighbors in js loop

doing so in R is expensive, as it comes after I load all of the data
up into RAM.

Untested
add connect to pg for checking neighbors

had to slow down things a bit to stop couchdb from crashing
Still crashing couchdb. bump limit down to 5
couch still crashing.  fixup callback order a bit
Merge branch 'feature/usepsql'