Cost-Based Semantics for Querying Inconsistent Weighted Knowledge Bases