Reimplement working with connection profiles

Reimplement working with connection profiles using new implementation of wizards. Write also some tests.