use grunt-text-replace to flip image names for rtl

Move the last of the RTL out of the core files.

It also lets me escape some weird interaction where
javascript was adding classnames to change the image but the old
RTL solution was adding .dir-rtl and messing up the specificity.