Fix toJsLiteral(QVariant).

For QVariants of QString type, toJsLiteral(QString) must be called
instead of the simplistic conversion that currently takes place. This
fixes handling of backslashes and double quotes.

Change-Id: I70c1ee4bc2c6b913c6f71fa644671bf33525966f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>