Nadal warms up for Olympics with doubles win in Bastad