Petrobras buys refinery stake, sets stage for expansion