Only create HDF5 file if we really need it

Delay opening of HDF5 file for write until we
come across a matrix type.

Change-Id: Ied640612ee93bc1f08ae2faf4499bfd7c3bc340a
Merge topic 'cml-hdf5-fix' into master

d2e8480e Only create HDF5 file if we really need it