Piecewise automatic groups