[1.5.x] Updated the bundled version of six to 1.4.0.

Backport of 4292097078279226cb725c2921011fb14634b9af from master.
[1.5.x] Fix #21185: Added tests for unescape_entities.

Also fixed a py3 incompatibility.
Thanks to brutasse for the report.

Backport of 3754f4ad410640382f9fe25073da03009cdc2ea3 from master.