Lasers as particle accelerators in medicine: From laser-driven protons to imaging with Thomson sources