WIP: Mapping over [] returns []. Fixes #6719

This PR resolves #6719 as suggested by Jeff Bezanzon. Have a look there
for a description of the problem.

I am a bit troubled that i'm essentially able to return anything I want here.
Ie in scala, the map function on a list looks like this: `map[B](f: (A) ⇒ B): List[B]`.
Without this sort of constraint i could reasonably

- return {}, as before
- return the input A if isempty(A)
- return []

It would be ideal if I knew the return type of f, then that could be the return type
of map. Without this, I don't see clear semantics for the map function across 
all of it's methods. What about mapping over an empty range? This currently 
returns {}, should that also be changed to []? What about all the iterables? 

This is my first pull request, sorry for all the questions :)