Ultrafast X-ray generation and applications using laser-linac interactions