Added assertion for formatter
Added assertion for db
Added getFormatter and hasFormatter and tests for these methods
Added check if writer already has a formatter
Removed unused use statement
Merge pull request #5882 from Martin-P/issue-5881

Allow setting formatter for Zend\Log\Writer\Db via config options
[#5882] Adjust visibility of new methods

- `(get|has)Formatter()` are not part of the `WriterInterface`, and are
  primarily internal implementation details. Made them protected, and
  adjusted tests to use reflection to make them accessible in order
  to test internal state.
[#5882] Added note to README
Merge branch 'feature/5882' into develop

Close #5882
Fixes #5881