[Bindings/Perl] Optimize Perl Memory Map bindings for text scrolling

This patch reworks the Memory Map code for putting text on a matrix
or tree to optimize the code to allow faster scrolling and scrolling
of larger text strings on horizontal matrices.  Future similar
enhancements are possible for vertical matrices or trees, but these
are not on the short TODO list.