add tool-template and generatedcode-runtime version compatibility check

Target authors add a VERSION template and supply a RuntimeMetaData.checkVersion() method.