Facing predictions of dangerous floodwaters decades in the future, this coastal Maine town is acting now