Cached the scroll and selection commands

The scroll and selection commands aren't dependent upon any document
state and hence can be cached.  Also took the oppurtunity to remove some
unused parameters from CommandFactory