Fix none getattempt lambda

fix-none-getattempt-lambda is a cherry pick from #716, that fixes:
- closes a bug from #838 (see https://github.com/fail2ban/fail2ban/issues/838#issuecomment-60904420)
- probably closes #848 also
- a fix for disturbing "bug" within servertestcase - preventing to write into stderr (see https://github.com/fail2ban/fail2ban/pull/716#discussion-diff-14126349)
See my commit message:
<blockquote>database: getBansMerged should work within lock, using reentrant lock (cause call of getBans inside of getBansMerged);</blockquote>
Using a simple `Lock` would have an endless sleep as a result.