An RF-gun-driven recirculated linac as injector and FEL driver