Lancashire’s TV star coroner has announced he is to retire from the job after nearly 20 years of service.