Oil gains as tensions over Iran eclipse inventory build signs