Add list_by_node_id() to Port object

What it says. Also make the code and tests use them vs direct calls
to dbapi.

Change-Id: I5bfa6ec93be0d6f7460d5b1c45a057cc7ab3bc9b
Partial-Bug: #1314732
Merge "Add list_by_node_id() to Port object"