Ex-wife of former Jakarta governor Ahok hid affair, court told