Refactor code.

 * Move GUI to separate file to prepare for other interfaces.
 * Show error dialog instead of printing exceptions in console.
Choose between 2-4 variables in GUI.

 * Also fix bugs related to code generation for < 4 variables.
Allow deletion of implicants from the list.