Planning as Satisfiability with Preferences