Add unlink_user function

This allows it to be overriden. Also removes the dashboard_access
permission if the user is not linked to any other partners. This is the
inverse behaviour to link_user.