fix: check only the last line in the sge qsub stdout
enh: replace id extraction with regular expression
BUG: initial_moving_transform_com needs default

The initial_moving_transform_com needs to be defaulted
to false in order to maintain backwards compatibility.

When this is not default = False, it results in

initial_moving_transform = <undefined>
initial_moving_transform_com = <undefined>

Error:
Registration requires a value for input 'invert_initial_moving_transform' because one of initial_moving_transform is set. For a list of required inputs, see Registration.help()

Adding try catch block to ensure that conversions occur properly, or use defalut behavior
if boolean is undefined.

File "/Shared/sinapse/sharedopt/20130601/RHEL6/DTIPrep/BRAINSTools-build/NIPYPE/nipype/interfaces/ants/registration.py", line 471, in _format_arg
int(self.inputs.invert_initial_moving_transform))
TypeError: int() argument must be a string or a number, not '_Undefined'
WIP: DO NOT SUBMIT For Review Only

ENH: Large SGE jobs were overloading on qstat

When large jobs were run with SGE, the accumulation of
qstat queries was causing a massive load on the cluster
server, and was affecting overal system performance.

This modification queries based on userid, stores information
about all that users jobs (both running and recently finished),
subsequent queries are then addressed by looking at the cached
values first, then only updating with a system qstat call
periodically.  This change so that qstat is called on a
more reasonable replication time frame.

The qstat interval is set as a heuristic based on when
the last job succeeded and how many jobs the user has running.
Set a maximium qstat interval per task of 120 seconds.
Set a minimum qstat interval per task of 3 seconds.