Fix none getattempt lambda

fix-none-getattempt-lambda is a cherry pick from #716, that fixes:
- a bug from #838 (see https://github.com/fail2ban/fail2ban/issues/838#issuecomment-60904420)
- a fix for disturbing "bug" within servertestcase - preventing to write into stderr (see https://github.com/fail2ban/fail2ban/pull/716#discussion-diff-14126349)
didn't check coverage  but confused  since mi  it's a  dict with only ip and ticket keys, so why  to  check for idx (jail, all)  in there?