Low-rank matrix reconstruction and clustering via approximate message passing