Fix several bugs in SyntaxParser.parseQuotedSyntax

Fixes (based on JUnit results):
- ArrayIndexOutOfBoundsException due to unchecked [i + 1] indexing
- ClassCastException due to incorrect usage of List.toArray (needed an
array passed in with the desired type)
- Logic error: quotation marks passed in as escape sequences were
omitted ("c""d" -> cd : expected -> c"d)