The fifth data release of the Kilo Degree survey: multi-epoch optical/NIR imaging covering wide and legacy-calibration fields