pagination support

dont merge just yet, im on a train, i need to test when I get home.
had to cache the topicsMainPids 

to improve the performance of the posts query, since now it gets called more than once, can't wait 26seconds :)

Oh tested by the way:

Some log results 
```
current phase: importerComplete
current phase: importerTeardownDone
current phase: importerTeardownStart
Config restored:{"title":"NodeBB","showSiteTitle":"1","postDelay":"10","initialPostDelay":"10","minimumPostLength":"8","allowGuestSearching":"0","allowTopicsThumbnail":"0","allowRegistration":"1","allowLocalLogin":"1","allowAccountDelete":"1","allowFileUploads":"0","maximumFileSize":"2048","minimumTitleLength":"3","maximumTitleLength":"255","minimumUsernameLength":"2","maximumUsernameLength":"16","minimumPasswordLength":"6","maximumSignatureLength":"255","maximumProfileImageSize":"256","profileImageDimension":"128","requireEmailConfirmation":"0","theme:type":"local","theme:id":"nodebb-theme-lavender","theme:staticDir":"","theme:templates":"","theme:src":"","allowGuestPosting":"1"}
current phase: fixTopicTimestampsDone
current phase: fixTopicTimestampsStart
current phase: relockingTopicsDone
current phase: relockingTopicsStart
Importing 109662/109689 posts took: 339.62 seconds
current phase: postsImportDone
skipping post:_pid: 4971 _tid:214 imported: false
skipping post:_pid: 4967 _tid:214 imported: false
skipping post:_pid: 4964 _tid:214 imported: false
skipping post:_pid: 4956 _tid:214 imported: false
skipping post:_pid: 4954 _tid:214 imported: false
skipping post:_pid: 4952 _tid:214 imported: false
Importing 109689 posts.
current phase: postsImportStart
current phase: topicsImportDone
Importing 3442/3443 topics took: 114.55 seconds
[count:200] skipping topic:_tid: 214:cid:11:_cid:16:uid:98:_uid:97 err: Error: [[error:invalid-title]]
Importing 3443 topics.
current phase: topicsImportStart
current phase: categoriesImportDone
Importing 13/13 categories took: 0.22 seconds
Importing 13 categories.
current phase: categoriesImportStart
current phase: usersImportDone
Importing 188/188 users took: 2.02 seconds
Importing 188 users.
current phase: usersImportStart
current phase: resetGlobalsDone
current phase: deleteTmpImportedSetsAndObjectsDone
current phase: deleteTmpImportedSetsAndObjectsStart
current phase: resetGlobalsStart
current phase: purgeUsersDone
current phase: purgeUsersStart
current phase: purgeCategories+Topics+PostsDone
current phase: purgeCategories+Topics+PostsStart
```
0.1.3 - still backward compatible
tablePrefix should default to blank,

in case it was really blank so it would work
rm config log
Merge pull request #5 from akhoury/patch-1

pagination support