safe_stack_impl: add non-throw swap
add safe_stack class
add safe_stack implementation