Bugfix: Use default page template if available

When adding a page (probably only programmatically), the default page template was not respected. Adding a page of type 'X' would result in adding a page of type X with a blank/no template, which would in turn display as the default template. I added one line of code to resolve that, so it now uses the page type's default template if we know it. The template can still be overridden by manually providing the `$template` parameter.
Use default template on page add when none provided

This is a more comprehensive version of the previous commit. It adds code for when no `$template` parameter is provided to the `add()` function. When that parameter is omitted, and when the user did provide a page type, then it will now use the page type's default template. 

This is an improvement over the previous version because it fixes the problem rather than the symptom, and as such fixes dependent behavior, such as that it will now copy the page type's default blocks as well (which it didn't in the previous fix).
Merge pull request #1333 from infostreams/patch-2

Bugfix: Use default page template if available