Fix: Legacy support for chunks in pages plugin

I might be wrong, but I figure adding a simple check for the existence
of the chunks database table fixes current issues experienced with
fresh installs of 2.2, while maintaining legacy support for chunks for
older installs.

Fixes: https://github.com/pyrocms/pyrocms/issues/2211
Update system/cms/modules/pages/plugin.php

Fixing indenting
Fixed incorrect ternary that was breaking the return value in the helper:count plugin
Merge branch '2.2/develop' of github.com:pyrocms/pyrocms into 2.2/develop
Merge pull request #2321 from Solinx/2.2/dev/chunks_and_page_children

Working fix: Enabling pages plugin for new 2.2 installs
Merge remote-tracking branch 'origin/2.2/develop' into feature/bug-fixes