Add test case for pool_name

This tests adding prefixes with pool_id and pool_name set and shows our
current problem with accepting pool_name.

Part of #316.
add_prefix now accepts pool_name

Possible to add a prefix to pool on prefix addition by setting
pool_name...

Also added test cases for modifying a prefix and setting pool but it's
currently commented out as it's not working.

Part of #316.
Fix bug in SQL constraint

Query inadvertently selected more than 1 row.

Also removed comments for test cases on modifying prefix to being part
of a pool.

Found through test case for #316.
Fix edit_prefix to work with pool_name

Fixes #316.