Optimization for tileMatchesAvailable

A small change to tileMatchesAvailable.  There is no need to check every
tile on all 4 sides, which will check every pair of tiles twice.  It is
sufficient to check on two sides.