Rafael Nadal ends year as world number one for fifth time