Making maps of cosmic microwave background polarization for B-mode studies: The POLARBEAR example