First step of porting to gi and gst 1.0
Make more progress in porting - most things work again.
Finish porting