MAINT: Clear up naming and logic in resample close.
MAINT: Clear up naming and logic in resample close.

- Instead of maintaining a separate `j` value, set the bounds of the range so
that `i` is the values emitted by the range.
- Change `close_loc` to `prev_close_loc` since the market close location is used
to ensure that the data index stops at the market open if the entire day is
nans.
- Change the setting of `loc` to be done before the loop which check for nans,
instead of setting to the previous close loc at the end of the loop.

This prepares for a separate fix to prevent out of bounds access when the first
session has nans for all minutes.

alphaBenj/zipline,enigmampc/catalyst,bartosh/zipline,humdings/zipline,alphaBenj/zipline,florentchandelier/zipline,florentchandelier/zipline,humdings/zipline,Scapogo/zipline,Scapogo/zipline,enigmampc/catalyst,quantopian/zipline,quantopian/zipline,bartosh/zipline