Water in low-mass star-forming regions with Herschel . HIFI spectroscopy of NGC 1333