Handle NaNs
This MR adds a check for NaNs when reading a sky model (see RAP-705) so that sources or patches with NaNs are skipped. A test was also added that reads a model with NaNs and performs grouping with the meanshift algorithm (a case that previously led to a crash due to ever-increasing memory usage).