Avoid seeing end of self-closing tag as filepath
Only call real_index() if necessary

If normalisation leaves the string unchanged, just use the indexes
as-is, instead of using the expensive real_index() method to calculate
them.
Fixes comment to match the real purpose of the file
Optionally accept a parameter with the preferred parent

This helps us to reconstruct a tree closer to what it was when we undo
from a delete, for example. This fixes some errors when we undo a delete
that happened at the boundary between a placeable (for example ph) and
the text next to it.
Fix a syntax error in Python 3

`[filename for filename in 'COPYING', 'README.rst']` is only valid in Python 2.
PHP: Add support for nested arrays

Fixes bug 2240
PHP: Add support for blank spaces in array declaration

Fixes bug #2646
PHP: Update module docstring
Add PHP storage test to check whitespace in nested arrays declaration
PHP: Add code to warn about duplicate entries

Such entries throw the error "'NoneType' object has no attribute 'getnotes'"
when converting to po using a template, which is hard to trace, so better
warn.
Revert "Revert use of 'with' statement for python 2.4"

This reverts commit 7fac4b8d4afb9830f9d9d16c5bde2b593896828c.
Cleanups
Cleanups
Split Android tests
Test how we wrap long lines a bit
Rewrite quoteforpo() for performance

This way we only escape the whole string once. We now wrap the escaped
text, instead of escaping the wrapped text, which is closer to what
gettext does.
Allow up to 77 characters per line

Now that we wrap escaped text, this brings us even closer to how gettext
formats lines.
Update test to conform to msgcat

Tested with msgcat version 0.18.2
Fix broken test
Remove unused code