Interferometric visibility in curved spacetimes