added flatten() and some utils from heartFelt mods

- moved ma_nans() to ocupy utils for general usage (was in
  heartFelt.utils)
- added copy_empty() method to DataMat to allow copying structure
  without fields
- added rename_field() convenience function
- added the add_average_field() function from heartdatamat, allowing
  easy way of reducing hierarchical fields in a DataMat to single metric
  for each element (ie, derived_bpm (which is an array for each DataMat
  element) to mean_derived_bpm which has a single number for each
  element)
- added the flatten(dm) function which unravels a hierarchical DataMat
  to a flat structure (fixmats were flat, heartdatamats are
  hierarchical) - this is a precursor to loading into pandas dataframes
  of doing customised sample-based (as opposed to trial/element-based)
  merging