Precompactness and total boundedness in products of metric spaces