Linear orders and semiorders close to an interval order