Try to fix #322 - Not showing more than 5 images in galleries.

The problem start when using the `[gallery]` shortcode. The gallery shortcode is
defined in `media.php, line 702`. Specifying ids in the shortcode sets the
`include` parameter (`line 712`) for the `get_posts()` call (`line 746`).

    $attr['include'] = $attr['ids'];

`get_posts()` is defined in `post.php, line 1676`. At the top of the function
defaults are given and the `numberposts` option is set to `5`. (`posts_per_page`
is not mentioned)

    function get_posts($args = null) {
    	$defaults = array(
    		'numberposts' => 5, 'offset' => 0,
    		'category' => 0, 'orderby' => 'date',
    		'order' => 'DESC', 'include' => array(),
    		'exclude' => array(), 'meta_key' => '',
    		'meta_value' =>'', 'post_type' => 'post',
    		'suppress_filters' => true
    	);

`get_posts()` then sets posts_per_page based on `numberpages`. `line 1689`:

    if ( ! empty($r['numberposts']) && empty($r['posts_per_page']) )
    	$r['posts_per_page'] = $r['numberposts'];

Additionally it also sets `posts_per_page` based on the number of ids in the
`include` parameter. Note it does not also set `numberposts`. `line 1693`:

    if ( ! empty($r['include']) ) {
    	$incposts = wp_parse_id_list( $r['include'] );
    	$r['posts_per_page'] = count($incposts);  // only the number of posts included

It then passes the arguments to a new `WP_Query` object and calls `query()` on
it. `query()` calls `WP_Query->get_posts()` (defined in `query.php, line 2152`).
`get_posts()` makes absolutely no mention of `numberposts`. It uses
`posts_per_page` to construct its SQL, possibly getting the value from an option
(`line 2222`):

    if ( !isset($q['posts_per_page']) || $q['posts_per_page'] == 0 )
    	$q['posts_per_page'] = get_option('posts_per_page');

The problem is that Timber tries to support the `numberposts` parameter even in
situations where WP doesn't respect it.
[Function Reference get_posts](http://codex.wordpress.org/Function_Reference/get_posts)
claims:

> Note: 'numberposts' and 'posts_per_page' can be used interchangeably.

However the Timber fix from commit dc42a63b1b235597d3fcf427adc73dc4469d63c5
trusts the `numberposts` parameter over `posts_per_page`. I think the precedence
of these two should be reversed as it seems `posts_per_page` is used more,
particularly in documentation and the shortcodes etc.

This commit only sets `posts_per_page` if it has not already been set.

Ideally however, this is a WordPress issue which needs fixing.
Merge branch 'IJMacD-322_numberposts_attachments'

* IJMacD-322_numberposts_attachments:
  Try to fix #322 - Not showing more than 5 images in galleries.
  added a sanity check so that we don't send blank menus to WP for processing
  fix wp_query reference in author.php
  ref #328 -- wrote test to validate sidebar PHP behavior