Added option to have a mainfile for all projects.

Current JSDoc3 supports handing a README.md (anything README or ending
in .md actually) to it, and uses this as the mainpage.

This patch adds behaviour that mimics this.

Only tested for the positive case, e.g. not tested without mainpage,
sorry about that.