BP buys energy tech firm; forms partnership with renewables