Fixed bug in `rates_isi`

As shown in #594. The function wasn't using the time of
the last spike, causing the rate before the last spike to be
stretched.
That seems to be true if `midpoint == True`, but not if `midpoint == False` (at least from how in understand the code).