A solver for clustered low-rank SDPs arising from multivariate polynomial (matrix) programs