Portland’s fireboat played a pivotal role in containing the Custom House Wharf fire, preventing what officials say could have been far more extensive damage along the waterfront.