Theory for polymer analysis using nanopore-based single-molecule mass spectrometry