Peru ex-President detained, accused of 'rebellion'