Oil futures end higher, natural-gas prices decline for a third session in a row