Welcome to the forum.
Try a search on this subject, DI v. Piston has been debated ad nauseum...often getting pretty heated.
But, to answer the direct question you posed:
Wouldn't a piston set-up keep the action cleaner?
The answer to that one is beyond any type of debate, it's an absolute "yes" as the combustion gases are not blown back into the receiver.
Far as location of the gas block, it is a function of barrel length, and pressure needed to reliably cycle the action.
Don't forget that you're comparing apples and oranges, in that the M14 is cycling full-size rifle rounds with a much heavier action than the AR platform.