Ant based PHP Build

Bootstrapped Totara &
Consolidation of files

moved back up of tests and collapsed duplicates.