Optimization in SMT with LA(Q) Cost Functions