Add ParticipantSet

Relieves Merit::Order of the need to manage and categorise the
participants, and moves it to a separate class.

This addition allows us to cache the always-on and transient producers
in the set, meaning we can pause execution of a calculator without
having to (expensively) re-partition the producers.
Remove `remaining` param from `compute_loads!`
Rename `compute_load!` to `compute_point`
Split User into TotalConsumption and WithCurve

TotalConsumption works identically to the old user, while WithCurve
allows you to give the user a load curve (with pre-calculated per-hour
demands for the user). WithCurve satisfies the needs of an an export (or
"demand") interconnector as per #105.
Ensure that demand may never be sub-zero

If we arrive at a point where the sum of the demand of all users is
below zero, a SubZeroDemand error is raised.

This would occur if using negative values in a User::WithCurve, where
abs(negative_value) is greater than the sum of all other user demand.
Fixes for RSpec 3.0

It appears Semaphore is only installing gems from the Gemspec; there
were gems in the Gemfile which restricted the RSpec version to < 3.

Compatibility with RSpec 3 has been added to get the specs passing.
Fix stub example to use User.create
Add SupplyInterconnect producer

Models an import interconnector which behaves much like any other plant,
except that it defined it's marginal cost using a curve, instead of
being constant.

ParticipantSet::Resortable has been added to ensure that producers are
re-ordered according to their marginal cost in each point calculation,
but ONLY if the set contains one or more producers with a variable
marginal cost. SupplyInterconnector is the only such class at this time.

This change is performance neutral for merit order calculations which do
not involve a SupplyInterconnector, and roughly doubles calculation time
for those which do.

To create a SupplyInterconnect, first create a LoadCurve where each
value in the curve is the price for that hour (ignoring that the name
"LoadCurve" does not describe this use):

  prices = LoadCurve([1.0, 2.0, 1.2, 2.2, ...])
  conn   = SupplyInterconnect.new(price_curve: prices, ...)

Closes #105.
LoadCurve becomes Curve

The class contains features common to several types of curve (including
the upcoming CostCurve). We should extend it to add domain-specific
features as needed.
Add CostStrategy

Splits calculation of producer cost into separate classes. A "Constant"
strategy behaves exactly as the Merit Order used to (with a single
unchanging marginal cost in every point).

  Producer.new(marginal_cost: 100.0, ...)

FromCurve allows you to provide a Producer with a :cost_curve attribute
(whose value should be a Curve instance) with a custom marginal cost for
each point.

  Producer.new(cost_curve: Curve.new(...), ...)

Finally, LinearCostFunction varies the marginal cost of the producer
according to how heavily it is used.

For example, to create a producer with a mean cost of 100, which may
vary by 2%; the marginal cost would therefore be 99 if the producer has
no load, or 101 if fully-loaded:

  Producer.new(cost_function: { mean: 100, spread: 0.02 })

Closes #109
Improve the way to create a cost-function producer.

Previously:
  Producer.new(cost_function: { mean: 100.0, spread: 0.02 })

Now:
  Producer.new(marginal_costs: 100.0, cost_spread: 0.02)
Marginal cost never has an argument
Fix sorting producers with zero output capacity
Add SOLL pricing

The price-setting producer is now determined according to the way the
producer's cost is set.

* Producers whose cost is a function will be price-setting if the
  producer has at least one "unit" of capacity remaining.

* A producer will be price-setting if it is the final producer to be
  assigned a load, and "provides_price?" responds to true. Currently
  only the SupplyInterconnect satisfies this requirement.

* The old system of using the *next* producer will be used whenever a
  cost-function producer has less than a unit of capacity remaining, or
  if the final producer to be assigned demand uses a constant or
  curve-based cost.

Closes #110
Add a test complement to the Convergence calculator
Rename linear_cost_function to cost_at_load
Never raise an error when calling Order#price_at

It is possible for a producer to be price-setting when fully-loaded if
it is the final producer.
LoadProfile.load now takes a full path

No more wrapping blocks of code in Merit.within_area and other nasty
globals. Give LoadProfile.load a full path to the load profile you wish
to read.

Participants no longer accept a :load_profile_key attribute, but instead
expect a LoadProfile provided as :load_profile.
Add PointTable

Given a calculated Merit Order, produces a table for a specific point to
show how load is assigned among the producers.
Add assert_price_setting! to CostStrategy