Add register_xxx API to parser and formatter plugins

Currently parser and formatter call 'TextParser.register_template(...)'to register plugin.
This is different from Input/Filter/Output plugins. So adding same API to parser and formatter.