OOIION-1707 Reworked PHWATER functions to accept blocks of multiple records as inputs.

Vectorizes the code to enable the PHWATER functions to accept either a single record, or a group of records as inputs. Also, reworks the test functions to create tests to confirm that the function works with only one record or multiple records at one time as inputs.

Minor formatting and commenting applied as well.