First pass at cleaning up threading and file closing for SGMFastScanActionController. Looks like we can clean this up for all ScanActionControllers to make it more generic and cover more cases.
Moved functionality for emitting signals and and handling responses for closing file writing to AMScanActionController. Subclasses still responsible for actually instantiating the file writer and the thread. Tested on SGM using XAS (AMStepScanActionController) and fast scan. Working for succeed, cancel, and skip. Looks like there was an edge case in skip, cancel, and fail previously that wouldn't clean up the file writing which leaves hanging file descriptors. The OS can only handle so many open files at once.
Added:
- A axis stack counter to keep track of how many axes are currently
running.  Once there are zero running, the scan controller knows that it
can safely shut down its file writer thread.
Removed debugs added in the process of troubleshooting the file orphaning problem. Also commented out some other qDebugs in SGM classes for the time being.
Merge pull request #950 from acquaman/Issue949

Tested by Darren. Works on SGM XAS and Fast scans. Works on VESPERS XAS and 2D scans. Final place that may have some trouble is REIXS. Will contact @epengr to find out for sure.