util, buffers: Preparatory improvements
We invent a new kind of buffer_if which is a readonly view of another
block of memory; such a view can be initialised with
buffer_view_readonly or buffer_view_clone. This makes a convenient
function to allow reparsing a packet, or using the buffer machinery to
parse a particular existing block of memory.
Also, make buffer_assert_free and buffer_assert_used actually call
assert (as well as logging the buffer ownership). So when these fail
(a) we don't attempt the clean teardown, and (b) we get a core dump if
those are enabled.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>