Path integral marginalization for cosmology: scale-dependent galaxy bias and intrinsic alignments