[API] Added the REST API for indexed scripts

Related elasticsearch/elasticsearch#5921
[API] Added the REST API for indexed search definition templates