Creates an API for Scala plugin

Moved bulk of the code in the internal package.
Created 'public' ScalaPlugin trait and object with minimum interface
Moved used constants in new object SdtConstants, some name clean up
Updated the source to be compatible with the changes