[ticket/11688] Purge TWIG cache

Purge directories
Replace opendir() with DirectoryIterator

PHPBB3-11688
[ticket/11688] tpl_ files are no longer used

Remove tpl_ and ctpl_ from cache->purge() because those prefixes
are no longer used.

PHPBB3-11688
[ticket/11688] Rename purge_dir to remove_dir

PHPBB3-11688
[ticket/11688] Fix docblock

PHPBB3-11688
[ticket/11464] Add missing and remove unnecessary database entry

PHPBB3-11464
Merge pull request #1632 from Elsensee/ticket/11464

[ticket/11464] Add missing and remove unnecessary database entry
Merge pull request #1563 from cyberalien/ticket/11688

[ticket/11688] Purge TWIG cache