Compress output before storing it to cache, if output compression is enabled

Based on PR #964
Use config_item() in CI_Output::__construct()
Merge changes from develop
Merge branch 'develop' into feature/output_compressed_cache
Merge branch 'develop' into feature/output_compressed_cache
Merge branch 'develop' into feature/output_compressed_cache
Added save_queries config setting in config/database.php
Fix whitespaces to tabs.
Merge pull request #2830 from abdmaster/fix/config/database_save_queries

Added [save_queries] config in config/database.php
Polish changes from PR #2830
Merge branch 'develop' into feature/output_compressed_cache
Fix #2737
Fix #2729