LPS-36711 Pagination still appears when no items are available

Since Jonathan is out for a few days I am sending this pull request to implement the changes suggested in https://github.com/matthewkong/liferay-portal/pull/266