Fixed potential pointer overflow leading to a potential infinite loop in db/storage/record.cpp

In order to iterate over the data in the record there was a previous loop that
compared pointers, this will not work as expected. In C, it is undefined
behavior to increment a pointer more than 1 past the end of the array to which
it points. This may cause this loop to never exit. This is a combination of how
the compiler may optimize the size of the pointer, and the architecture that
the system is built for.

See section 2.4 of http://pdos.csail.mit.edu/papers/ub:apsys12.pdf for more
information.