blockmanager: simplify interval write logic
blockmanager: simplify interval write logic

Instead of writing the received interval if it is our current one, we
add all intervals to the cache, then in order write what is found in the
cache. This makes it easier to keep track of the last written height,
which will be important in later commits when we need to know when to
stop waiting for more headers.

lightninglabs/neutrino