Instead of sleeping wait for ports to be open

After starting selenium and phantomjs run a loop and wait for the ports to be active for those services.
Merge pull request #602 from jrjohnson/waitforports

Instead of sleeping wait for ports to be open
Clean up and enable Learner Group test
Remove legacy group selection code

Cleaned up group selection elements, that had some commented out code
from early ilios beta.  Since groups can not be selected in the picker
all of this can be pulled out.
Only remove the user from the group they are in

When adding a user in the learner groups make sure we only delete them
from the current group not the top level group.  This allows them to be
used in any other groups as well without refreshing the page.
Remove ilios.gm.mm.sortFilteredResults

ilios.gm.mm.sortFilteredResults was only ever called by itself.  Which
is a lonely kind of recursion.
Redraw the selection tree on every refresh

Usually ilios.gm.mm.redrawTreeAndUpdateCSS gets called when the list of
users is filtered, however when that list is empty (all users already
selected) it was not getting called at all.
Test for duplicated in learner group picker

This test ensures that the learner picker is refreshed on each load and
doesn’t hold onto its state when it is opened twice.
Fix navigate to tab

In some cases tabs cannot be clicked, instead of having two different
test statements for this, just put a case statement in the navigate to
tab statement to handle these.
Clean up learner group tests
Split up into multiple tests and add the users automatically.
Cover all learer selection scenarios including ignored test for #596
Revert changes to learner management
And once again ignore the test for #199.
Fix method name

Copy/pasted method name was not right.  Changed it to reflect what is
actually happening.