Rewritten patterns plugin

Settings variable min_cred_protect is deprecated, this is now set individualy for each pattern. Implemented exceptions, including credetnials exception.

New command syntax:
!patternadd <type> <min protected credentials> <pattern> ... add pattern
!patternexadd <pattern ID> <min protected credentials> <pattern> ... add exception
!patternexdel <exception ID> ... del exception
!patternexlist ... list exceptions

!patternlist and !patterndel have the same syntax as before

How this stuff works:
Adding patterns is almost the same type is 1 (chat) or 2 (PM). Min protected credentials is self-explanatory.
Adding exceptions is based on reference to ID of a pattern (see example).
Exception min protected credentials should be set at least one level lower than pattern credentials, otherwise exception does not work.
This makes possible to add patterns for a range of user levels (see example).
Deleting patterns deletes also its exceptions and it is impossible to add exception to nonexistent pattern ID (foreign keys, sqlite 3.6.19+).

Example:
We want to ban links in mainchat up to operator credentials (guest and users cannot send links), but we want registered users to be allowed to send links to youtube videos.
!patternadd 1 operator \S://\S+
!patternlist .... assuming this is not our first pattern, patternlist shows the pattern's ID is 4
!patternexadd 4 user youtube.com

Use it or discard it, enjoy