Fixed: isallowed() in Twig failed for contenttype arrays

Now supported:

- Extended query syntax (and, or, (), ...)
- Content objects as second argument
- contenttype arrays as second argument
- contenttype slug as second argument

Fixes #1383.
Using new permission syntax to simplify template code