Various enhancements and fixes

- Constrained the SOQL_TEMPLATE by master ids (extracted from the child
records passed in)
- Fixed field alias issue with large fields
- Fixed issue when there are no detail records, zeros or nulls the
rollup field
- Also made changes to test code to ensure it can be packaged (packaging org must have the customer fields to ensure tests run, however they will not get packaged, tests run in subscriber will not fail if test custom fields are not present)