Perl formatter improvement

The patch improves Perl code on non-ascii output. It reduces charactor corruption and well known warnings 'Wide character in print'.

It also change the literal delimiter from ""  to '' or q{} or q() to reduce variable escaping so that the test cases get more readable.

Since I haven't figure out how to build xpi so far, the patch is not properly tested.