Fix implementation of padleft/padright.
In theory this could be useful if we ever complete the implementation of
parser functions in parsoid, but I really needed it because I wanted to
remove the use of the async module in Params#getSlice, the implementations
of these parser functions used #getSlice, and I couldn't test that my
patch was correct because the underlying parser function implementation
was broken.
Change-Id: Idca89dae8992429580c6a02bf8ceb399090f6b83