To safeguard against non-refcounted objects being left over in a log
info piece (e.g. a string on the stack), add this new function to pop
pieces from the stack until the desired one is removed. This is needed
in case of a unpaired log_info_* without a matching log_info_pop.
closes #1511
Change-Id: I689de14d034df779521dfdf59f923fdbf7fabc9b
(cherry picked from commit 59a16e747b)
mr10.5.2