Improve regularity of STObject and STArray [RIPD-448 and -544]

- reduce duplicated code using templates
- replace BOOST_FOREACH with C++11 for loops
- remove most direct calls to new
- limit line length to 80 characters
- clearly identify virtual and overridden methods
- split STObject and STArray into their own files
- name files after the class they contain