Fix memory leaks caused by KisPaintDevice::convertTo()
For years this method returned KUndoCommand and for years we
forgot to delete this command, causing memory leaks.
This patch refactors convertTo() call to not return anythingon heap,
but just accepting optional parent command.