simplify/style-tweak/refactor conditionals in states.user,modules.{apt,file}

Arbitrary chunk chosen solely to be meaty enough.