Add placeholder[T](index) primitive to ErgoScript frontend
Problem
It is necessary to be able to write templates using ErgoScript. Any ErgoTree can contain segregated constants (see ErgoTree.constants), such that ConstantPlaceholder nodes are stored in the expression and refer to the constants by index. Every constant can be replaced in the array, without changing the tree, thus ErgoTree with constants can be used as a template, where each constant serves as a parameter.
Currently placeholders can only be created using IR nodes directly in Scala
Values.ConstantPlaceholder(0, SByteArray)
this should be possible to write in ErgoScript like
placeholder[Coll[Byte]](0)
This will allow to create ergoTrees in which some constant can be refered by more than one placeholder. This is not possible to achieve using automatic constant segregation (withSegregation method)
This is used in particular in rewardOutputScript template.