Adds image_hard_limit and reply_hard_limit options

Allows maximum reply and image limits to be set for threads. Also reworks the numPosts() function and uses it elsewhere too.

Threads that get very large (>10k posts) can cause issues, such as PHP running out of memory when attempting to build the thread. Very large threads that get posts constantly can cause big performance issues.

(Maybe $config['reply_limit'] should be renamed $config['bump_limit'] to more accurately reflect its purpose.)