Do a whole connecting process in a separate thread

This improves a system response when a connection is delayed.
Reduce calls to MessageBox() as many as possible
Refactor using KWorkerThread class
Use a message box of _kdlg in a worker thread

This prevents _kdlg from being selected if a user clicks to the dialog
window when a message box is displayed
Disable close button on canceling
Fix the problem that a dialog window loses a focus on canceling
Add Refresh feature
Use SortRecord() instead of SortRecordP()

P version was removed in KPMLib.
Set a timeout for libssh2 blocking functions
Display an error message on failure of reading a directory data
Close a SFTP handle on error
Use a C++ string variable for the file name to read
Reorder buffer allocation/deallocation
More error checks and error messages and reduce calls to MessageBox()