Fix pbs-aprun (qsub) launcher for machines that use moab/torque
Fix pbs-aprun (qsub) launcher for machines that use moab/torque

[reviewed by sung]

Moab/torque have known issues with mppwidth, mppdepth, and mppnppn options that
results in jobs never starting. 

Currently the pbs-aprun launcher adds these for options for batch and
interactive jobs for qsub versions that are detected as "pbspro" and "unknown".
moab/torque were detected as unknown since they didn't put any identifying
information in qsub --version. This patch detects if the pbs version is
moab/torque by doing a which moab. If we are running moab we use the node
option instead of the mpp* options. 

To detect if moab/torque popen is used to call "which moab" and if there was no
stderr then assume that moab is available (this is similar to how we look for
things in the chplenv scripts.) popen was used instead of the
chpl_run_utility1K because I only wanted to get stderr and which output can
exceed 1K. I only wanted to change things in the pbs-aprun launcher and not
the chpl_run_utility1K function since it's code freeze time. 

Tested on xk/xc to make sure pbs-aprun works with moab/torque now and with
pbspro still. 



git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@23049 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

chizarlicious/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,hildeth/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,hildeth/chapel,sungeunchoi/chapel,chizarlicious/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,sungeunchoi/chapel,chizarlicious/chapel