Improve speed of attrPath by reusing regexes

Saving these two regexes to a variable speeds up attrPath(). `attrPath`
used to take up about 35% of its time spent in `set`. With this change
it dropped down to 4.5%.

DEB-13407
Merge branch 'feature/DEB-13407-save-regex-for-attrpath' into tt_master