China signed an agreement with Nicaragua’s leftist Sandinista government to build thousands of homes for poor and working families, expanding the already existing Bismarck Martínez public housing program.