FASTQ Opt: In convert_read_to_format, adjust when new_encoding logic is calculated.
Doesn't change the behavior or optimize anything, this is just done to simplify subsequent commits.

Baseline:

I took the first 100 megabytes of a 26 gigabyte example of a FASTQ file filtered with the FASTQ filter tool that I found in an "Important Galaxy User"'s history on main. I ran with the same command-line on my dev box with the start of this file and using Python's -m to profile function times and total amount of time to serve as a baseline as I optimized the FASTQ filter code. Here is the start of the output:

Kept 135848 of 250000 reads (54.34%).
         200015991 function calls (199765991 primitive calls) in 136.934 seconds

Extrapolating this out, that 26 gigabyte file would take roughly 10 hours to process on my laptop - this is slightly longer than what it took on main - indicating to me this is likely not disk bound since my SSD would probably outperform main?
FASTQ Opt: Restructure fastq_filter to only call execfile once and reuse the same function.
After this optimization:

Kept 135848 of 250000 reads (54.34%).
         200015991 function calls (199765991 primitive calls) in 85.375 seconds

Down from 136.934 seconds on previous changeset. Main Difference:

(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   250000   45.130    0.000   67.811    0.000 {execfile}

 - became -

        1    0.000    0.000    0.000    0.000 {execfile}
FASTQ Opt: Utilize optimized in place alternatives to restrict_scores_to_valid_range.
Separate out ascii vs. decimal encoding branches of convert_read_to_format and use these new transform_ alternatives operate "in place" (don't produce new lists/allocate memory). The ascii version transforms to ascii in place instead of requiring another call and creating another array.

Runtime Result:

Kept 135848 of 250000 reads (54.34%).
         117148711 function calls (116898711 primitive calls) in 48.272 seconds

Down from 85.375 seconds on previous changeset. Main Difference:

(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   135848    1.185    0.000   59.856    0.000 fastq.py:71(convert_read_to_format)

 -became-

   135848    0.502    0.000   22.979    0.000 fastq.py:99(convert_read_to_format)

About a third the time is spent convert reads to the correct format. This is a varaint of the core optimization I made when optimizing the FASTQ groomer for MSI - it has likewise a substantial impact on the performance of that tool.
FASTQ Opt: No need to map(str) over chr and join, can just join chr's.
Prevent an extra array creation and chr-> str map per base. Shaves 10% off remaining run time of filter on SSD.

Kept 135848 of 250000 reads (54.34%).
         117012863 function calls (116762863 primitive calls) in 46.897 seconds

Down from 48.272 seconds on previous changset. Main Difference:

(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   135848    0.502    0.000   22.979    0.000 fastq.py:99(convert_read_to_format)

 -became-

   135848    0.448    0.000   21.159    0.000 fastq.py:99(convert_read_to_format)

Not huge, but a consistent improvement.
FASTQ Opt: Precompute difference ascii -> decimal difference.
Kept 135848 of 250000 reads (54.34%).
         117012863 function calls (116762863 primitive calls) in 39.416 seconds

Down from 46.897 seconds on previous changeset. Main Difference WRT:

(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   385848   18.215    0.000   22.866    0.000 fastq.py:90(get_decimal_quality_scores)

 -became-

   385848   11.415    0.000   15.546    0.000 fastq.py:91(get_decimal_quality_scores)

Looks like a math optimization but actual optimization is coming from reading local variable instead of dereferencing object variable twice per base per.
FASTQ Opt: Do not generate arrays just to check length.
... just compute what length would be.

Kept 135848 of 250000 reads (54.34%).
         117012863 function calls (116762863 primitive calls) in 38.412 seconds

Down from 39.416 seconds on previous changeset. Main Difference:

(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   500000    0.518    0.000    1.889    0.000 fastq.py:171(insufficient_quality_length)
   250000    0.322    0.000    1.103    0.000 fastq.py:173(assert_sequence_quality_lengths)

 - became -

   500000    0.306    0.000    0.932    0.000 fastq.py:187(insufficient_quality_length)
   250000    0.164    0.000    0.478    0.000 fastq.py:189(assert_sequence_quality_lengths)
FASTQ Opt: Eliminate a few extra calls to is_ascii_encoded.
Kept 135848 of 250000 reads (54.34%).
         117127015 function calls (116877015 primitive calls) in 38.632 seconds

Down from 39.416 seconds on previous changeset. Main Difference

(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   385848   11.289    0.000   15.499    0.000 fastq.py:91(get_decimal_quality_scores)
  1271696    0.716    0.000    0.716    0.000 fastq.py:71(is_ascii_encoded)

   250000    0.185    0.000   10.434    0.000 fastq.py:107(get_decimal_quality_scores)
   385848   11.380    0.000   15.368    0.000 fastq.py:109(__get_decimal_quality_scores)
  1135848    0.649    0.000    0.649    0.000 fastq.py:71(is_ascii_encoded)
FASTQ Opt: Disable formatting output, reading is already enforcing it?
This is would be huge optimization for filter at this point - it cuts the runtime of my filter test to half of what is remaining. This changeset if just leaving a comment because I am not certain the results are the same - though I strongly suspect they would be - I just want some confirmation before pulling the trigger. None of the test cases fail as a result of this or any of these changesets.

Kept 135848 of 250000 reads (54.34%).
         60407639 function calls in 18.837 seconds

If change made, this would be down from 38.632 seconds on previous call. Main Difference:
(ncalls|tottime|percall|cumtime|percall|filename:lineno(function))

   135848    0.357    0.000   19.710    0.000 fastq.py:631(write)

- to -

   135848    0.219    0.000    0.609    0.000 fastq.py:631(write)
Merged in jmchilton/galaxy-central-fork-1 (pull request #259)

FASTQ Optimizations (Round 1 - Filtering)