Fix link port identifying

In the context of postgresql:link $APP is storing the name of the app to
link to and not the name of the db container. This means the the
function to get the id of the container fails because it is looking for
the wrong name. If we pass through the name of the db container but at
all other times default it to $APP we should be fine.