Refactor pid selector into a directive

- move pid selector code into its own directive
- exposes $scope.activeProcess to the parent controller

#490