Synthesis of polymeric titanium and zirconium precursors and preparation of carbide fibres and films