Quasiminimizers in one dimension: integrability of the derivate, inverse function and obstacle problems