Fix display issues with RTL control characters in post names, subjects, ...

Fix display issues with RTL control characters in post names, subjects, and filenames.

A user who uses Right-to-Left Embedding or Override characters in their name, subject, or filenames can mess up the visual appearance of other fields on the same line. (This isn't an issue for the post body for example, because nothing else is displayed on the same line as it.)

This commit fixes it by introducing the bidi_cleanup function (called from within the templates), which pairs all LRE, RLE, LRO, RLO characters with Pop-Directional-Formatting characters (and removes any improper PDF characters), based on code from http://www.iamcal.com/understanding-bidirectional-text/