Extract common base code from 3x3 patterns

git-svn-id: svn://svn.code.sf.net/p/fuego/code/trunk@1927 2e953b5c-c64d-0410-be54-f773e93e544c