Dynamic Matching via Weighted Myopia with Application to Kidney Exchange