NuPathe accepts Teva's takeover offer, ends deal with Endo