Artificial Intelligence for Social Good: A Survey