Pattern matcher: general cleanup and code movement

API change to simplify the various bindlink implementations: this was an API change, so lots of code was touched. The actual changes are minor.