Oil halts advance near $45 after capping 2nd weekly increase