A Boundary Element Method for Motions and Added Resistance of Ships in Waves