std.variant: Implement applyVisitor and applyDelegate.

applyVisitor allows to apply a visitor to the given Algebraic depending
on its held type. It works like boost::apply_visitor of Boost.Variant.
A visitor is specified as a structure
or class which implements opCall overloads for each supported type of the
Algebraic. The function statically ensures that all types are handled by the
visitor.

applyDelegate works like applyVisitor but allows to specfiy the visiting
functions as delegates or static functions. Static checks ensure that
all types are handled and only allowed delegates are passed to the function.
std.variant: applyVisitor had unnecessary template restriction.
std.variant: Updated pull request according to klickverbot's comments.

- Now compiles now on 64bit. size_t -> int cast in unittest has been the problem. Unittests and documentation has been updated.
- Updated template constraints: applyDelegates doesn't need one as the previous constraint is implicitly checked during instation. applyVisitor now has an additional template constraint to just allow Algebraic types.
- Must not compile code in unittests has been replaced by static assert and __trait(compiles) checks.
std.variant: Added more explicit template constraint to applyDelegate which checks for a Algebraic type.

The new constraint isAlgebraic checks for all member functions and types used from  Algebraic and makes it hard to call the applyDelegate with arbitrary types.
std.json: implement opIndex in struct JSONValue for accessing elements with array/hash syntax
std.json: properly handle large ulong values (bigger than 2^63-1)

store large ulong values in JSONValue.uinteger instead of throwing an overflow exception
New implementation of visit and tryVisit that allows visitor structs and classes as well as delegate functions to be passed as parameters.

tryVisit is a new function which doesn't statically ensures that all types are handled by the visiting
functions. A VariantException is thrown if the algebraic holds a value which isn't handled by
the visitors.

visit and tryVisit share a common private template function as backend which does all the magic. applyDelegate and
applyVisitor have practically been merged into one new function.
Adding arity traits
Fix std.container.SList.linearRemove's TakeRange-bug (if the TakeRange starts at the
head of the SList, the whole list was removed instead of only the
specified number.)
Added doubly-linked list (DList) to std.container
Fix for issue# 8323.

I decided to improve the documentation for some of std.string's
functions and ended up optimizing their implementations as well (I
benchmarked the new versions against the old versions, so they should
definitely be faster). I also ran into bug# 8323, so I fixed it as well.
- Incorporate comments by andralex
Optimizations for startsWith and endsWith.
Performance improvements for popFront and narrow strings.
Add public import for KeepTerminator

This commit creates a public import for std.string.KeepTerminator. This
way if you use e.g. byLine() you do not have to import it yourself.
Merge pull request #662 from jkm/patch-1

Add public import for KeepTerminator
Merge pull request #660 from jkm/master

Fix enforce in popBack
Replace `typeof(<type>.init[0])` with templates

* ElementEncodingType (12)
* ElementType(1)
Add `ArrayTarget` template
Replace `typeof(<type>.init[0])` with templates

* ArrayTarget (12)