keep memory reference local

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add iom_reset to flush remaining elements

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
add: iom_reset_secure to reset ring buffer and clean data

Sometimes sensitive data is stored in the ring buffer. If you must make
sure to clean the memory too (which is _not_ done by iom_reset) then
this function must be used.

Note: this function has overhead because every byte is touched in the
buffer. So use this function only if really required.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
test: add reset test

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
iom_reset: replace self-crafted reset by global function

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>