Added destroy method and fixed some bugs

Bugs included:
- fixed issue where an error was generated if data-options wasn't set.
- fixed issue to deep copy $.extend so dialog and progressbar properties
were passed
- initialized dialog after appending the progressbar