Don't calculate total_pages if one is provided in options

In some cases, `scope.total_pages` (and therefore `scope.total_count`) is calculated without a `COUNT` query, resulting in an additional (potentially expensive) query. In this case, using a `distinct` scope causes the entire collection to be loaded.

**Example:** Rails 4.0.0, Ruby 2.0.0-p247
```ruby
@scope = Post.where(tag: 'test').distinct
@total_count = @scope.count # 17,294,103
```
```haml
= paginate @scope.page(params[:page]), total_pages: (@total_count / 25.0).ceil
```

**Without patch:**
```log
(7.1ms)  SELECT COUNT(`post`.`id`) FROM `post` WHERE (post.tag = 'test')
(170.0ms)  SELECT `post`.* FROM `post` WHERE (post.tag = 'test')
(2.8ms)  SELECT `post`.* FROM `post` WHERE (post.tag = 'test') LIMIT 25 OFFSET 0
```

**With patch:**
```log
(7.1ms)  SELECT COUNT(`post`.`id`) FROM `post` WHERE (post.tag = 'test')
(2.8ms)  SELECT `post`.* FROM `post` WHERE (post.tag = 'test') LIMIT 25 OFFSET 0
```