Restore printchplenv error messages for unrecognized TASKS/THREADS settings.

[Reviewed by Lydia.]

Prior r21803, nonsense values for CHPL_TASKS or CHPL_THREADS resulted in
a straightforward error message from printchplenv, such as:

  [gbt@home chapel]$ CHPL_TASKS=foo printchplenv
  ...
  CHPL_TASKS: 
  CHPL_THREADS: foo
  Unexpected CHPL_THREADS value "foo".
  ...

But after the big rewrite in r21803 we started seeing internal perl
errors in such cases.  This commit restores the old behavior.  It gets
rid of the internal errors by making sure that the tasks and threads
sub-scripts always return a value, even when an error occurs.

While here I also alphabetized the cascaded if() in chplenv/threads, and
fixed some white space problems.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22116 3a8e244f-b0f2-452b-bcba-4c88e055c3ca