Improve FITSWriter class and add FITSStatus structure.
Change the order of LD flags in tests/Makefile.