Preparation of YBa2F7 and its other rare-earth analogues