transform dialog stack to self-destroying stack

First part of code that demonstrate how to use wrapper around container holding pointers to prevent leaking memory and need to have Terminator.
Do not merge yet, but please discuss if it is right direction.
Especially for @anaseli and @mvidner to show what I have in mind with autodestructor instead of terminator.