Two Medicare programs that boost payments for hundreds of rural hospitals were extended through mid-December with the House’s passage of a short-term federal spending package on Friday.