Final set of updates for #1995

Here's a new set of updates for #1995. The new getIssueRegex functionality now works for both searches, and for processing of incoming mail account mails.

Some common code has been pulled-out and merged int o a new method for parsing text for issues and issue transitions.

There is one change in behaviour when processing incoming account mails:

The original code assumed that the subject will contain reference to only a single issue. The new code will actually be able to process multiple issues from the subject. It will apply the comment from mail, and link attached files, to every issue it manages to match (this seemed somewhat logical/consistent to me).

There's not much new features in here, but the changes are somewhat substantial.