JSHint modifications.

Various JSHint-suggested modifications.  Principally insertion of
semicolons, reduction of two-case switch statements to if/else, use of
=== and ==! comparisons.  Removal of accidental global i variable in
first-level apply function via simplification of function (i was
modified, but not read thereafter).  Further escape special characters
in getValue function regexp.
Add 'replace' option.

Add 'replace' option to preexisting append and prepend options.
Replace onEnd and onFound in tokenizer.

Remove apparent inadvertent implicit global onEnd and onFound in
tokenizer, replace with doBuild.  Frankly a bit confused regarding
presence of onEnd and onFound here, but this seems like the right thing.
jQuery 1.9.0 test validation

Use jQuery 1.9.0 for testcase.  Add jQuery migrate plugin to validate
no deprecated calls in use, and add DOCTYPE to html to silence jQuery
migrate warning regarding quirks mode.