Refactors port_create to break a deadlock case

Refactors port_create as a command pattern in an attempt to resolve a
deadlock case under heavy load. Individual side-effects of the
port_create are now isolated in their own transactions, with a larger,
manual rollback procedure in place of relying on a full DB rollback.
Merge pull request #64 from Cerberus98/master

Refactors port_create to break a deadlock case