how did oedipus become king of thebes