Mass accretion rates and histories of dark matter haloes