Stop REST check moved last to improve performance

Changed to check for REST functionality last for better efficiency.
If a test has failed, and the test is to be stopped, it is a waste of time to
first check whether REST commands are working since the result will be the
same.

The same is true for esel_stop_check.

Change-Id: I3237c0e06659eb3f587742cd7e737b7e373e7c9b
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/bin/plug_ins/Stop/cp_stop_check b/bin/plug_ins/Stop/cp_stop_check
index 9c7cca6..acaddfe 100755
--- a/bin/plug_ins/Stop/cp_stop_check
+++ b/bin/plug_ins/Stop/cp_stop_check
@@ -183,10 +183,6 @@
 
     print_plug_in_header()
 
-    rest_fail()
-
-    esel_stop_check()
-
     if STOP_COMMAND.upper() == "FAIL":
         if AUTOBOOT_BOOT_SUCCESS == "0":
             print_timen("The caller wishes to stop after each boot failure.")
@@ -200,6 +196,10 @@
             print_timen("The caller wishes to stop test execution.")
             stop_check()
 
+    rest_fail()
+
+    esel_stop_check()
+
     qprint_timen("The caller does not wish to stop the test run.")
     return True