Cosmic-ray produced 59Ni and its astrophysical and geophysical implications