Add index on pool_id

This will speed up listing of large pools.

Fixes #497.