Primary key on url table

use primary key in preference to unique keys. type,id was the common JOIN criteria so using that as PRIMARY over path. Enforce NOT NULL constraints on this table.

Its almost tempting to split the url table up into url_node, url_group, url_service and change "SELECT id, type FROM url WHERE path =" into SELECT id,'node' as type FROM url_node WHERE path=? UNION SELECT id,'group' as type WHERE path=? ....  but that would be just a little premature.

please forgive cascading PRs, too many conflicts otherwise. 03e9f2e is the focus here.