Host nation Equatorial Guinea are through to the semi-finals of the Africa Cup of Nations after a controversial 2-1 win over Tunisia in Bata.