Tory leadership contender said government was doing ‘too much’ on statutory maternity pay, before quickly backtracking