Weight Sharing

[Original PR notes copied from #500. This PR replaces it.]

This adds the ability to share parameters between layers, which has a number of applications, the canonical one perhaps being recurrent neural network (RNN) training.

To share weights between two or more layers with parameters (currently just `InnerProductLayer`s and `ConvolutionLayer`s), specify the same `param` for all of these layers.  (You can also name the biases with a second `param`, as in the `blobs_lr` and `weight_decay` parameters.)  You can see a very simple example of this in `src/caffe/test/test_net.cpp`: see the unit test named `InitDiffDataSharedWeightsNet`:

```
layers: {
  name: 'innerproduct1'
  type: INNER_PRODUCT
  inner_product_param {
    num_output: 10
    bias_term: false
    weight_filler {
      type: 'gaussian'
      std: 10
    }
  }
  param: 'sharedweights'
  bottom: 'data'
  top: 'innerproduct1'
}
layers: {
  name: 'innerproduct2'
  type: INNER_PRODUCT
  inner_product_param {
    num_output: 10
    bias_term: false
    weight_filler {
      type: 'gaussian'
      std: 10
    }
  }
  param: 'sharedweights'
  bottom: 'data'
  top: 'innerproduct2'
}
```

This means layers innerproduct1 and innerproduct2 are sharing the same set of weights as they've both specified `param: 'sharedweights'`.  And in this case they also take the same bottom blob, (`data`), so their outputs, top blobs `innerproduct1` and `innerproduct2`, should be identical (so this is not actually something you'd ever want to do; I do it there just for testing purposes).

Note that in this case we specify only one blob name because we've set `bias_term: false`; if we didn't have `bias_term: false` we'd need to specify two `param`s, but probably the second one should be empty unless we actually want to share biases.  (Specifying the empty string as a `param` is equivalent to not specifying a `param` in my implementation.)

```
param: 'sharedweights'
param: ''
```

The entire implementation is in `Net::Init`, `Net::AppendParam`, and `Net::Update`.  `Init` figures out which layer will actually "own" the shared param (the first one to list its `param`), and `Update` adds the non-owned layers' computed diffs into the diff of the owner blob, then only actually performs updates on owned blobs.  Memory-wise, all shared blobs actually point to the same memory location for the parameter's data, but still have separately allocated diff blobs, as the logic to handle learning rate, weight decay, etc is still handled by the Solver (which is blissfully unaware that parameters can be shared).

Open to hearing feedback on the interface, implementation, etc.  I'm not sure I'm happy with `param` as the name of the field, I think it would be less ambiguous to use `param_name` or something, but would be inconsistent with the other per-parameter field `blobs_lr` (and actually to be consistent with that it should be `blobs_name`, but I strongly prefer the singular here..).
We either must change the ownership from the first layer that mentions the param to the first layer that mentions the param **and** participates in the loss, or we need to fix the `layer_need_backward_[layer_id]` accordingly. Is my concern well justified?