Additionnal changes needed to remove sdt.editor from the play plugin

Play plugin PR: scala-ide/scala-ide-play2#225
(copying from [this old comment](https://github.com/skyluc/scala-ide/commit/f54da03bdbe5dda10ac8da370c1c95815073edc8#commitcomment-7797945))
Three problems with this:

- I believe `cEnd = c.getOffset + c.getLength - 1` so since you want to check `head.Start >= c.End` this should be 
  `head.getOffset >= c.getOffset + + c.getLength - 1`
- This is not `@tailrecursive`[¹], you want to use if/then/else/ for that
- This is quadratic in the size of the list and does not need to be

You  have an intersection if there is a, b in l such that 
    a.start <= b.start <= a.end

But when you scan regions in the list, you can start by checking the regions are ordered by start point, which checks the left part of the equality is always true as you go through the list.

So there's a problem if you have a, b in the list, with a before b in l, such that 
   b.start <= a.end

But admitting there would be one such problematic region a, then we would have 
    b.start <= max { x.end | x before b in l}

So if at each current region in the list the maximum end of previous regions is less than the current start, you have no overlap (contraposition).

Prototype implementation:

```scala
private def orderedAndNonOverlapping(l: List[TypedRegion]): Boolean = {
  @tailrec
  def orderedByStart(l: List[TypedRegion]): Boolean = l match {
    case x :: y ::tl => 
      if (x.getOffset > y.getOffset) false 
      else orderedByStart(y::tl)
    case _ => true
  }
  def maxEndNeverAfterStart(l: List[TypedRegion]): Boolean = {
    @tailrec
    def maxEndNeverAfterStart_aux(l:List[TypedRegion], currentMaxEnd): Boolean = l match {
      case Nil => true
      case x :: xs => {
        val xStart = x.getOffset
        val xEnd = xStart + x.getLength - 1
        if (currentMaxEnd >= xStart) false
        else maxEndNeverAfterStart_aux(xs, max(currentMaxEnd, xEnd))
      }
    }
    maxEndAfterStart_aux(l, -1)
  }
  orderedByStart(l) && maxEndNeverAfterStart(l)
}
```
[¹]:  I mean it should, but I don't think the compiler manages to do the optim & I wonder how we don't get a compile-time error