Pope's resignation a surprise despite earlier hints