libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush()