port of akka/spray's Uri class to Scala.js