Fixes sbt/sbt#4595
Ref #290
Ref #280
This is bit of an odd one.
To keep bincompat and also to fix sbt 0.13 compatibility issue we have made `Disabled` companion object extend `Disabled` type.
This actually created a subtle deserialization issue:
```
[error] scala.MatchError: Disabled() (of class sbt.librarymanagement.Disabled$)
[error] at sjsonnew.FlatUnionFormats$$anon$5.write(FlatUnionFormats.scala:220)
[error] at sjsonnew.JsonWriter.addField(JsonFormat.scala:40)
[error] at sjsonnew.JsonWriter.addField$(JsonFormat.scala:37)
[error] at sjsonnew.FlatUnionFormats$$anon$5.addField(FlatUnionFormats.scala:208)
[error] at sjsonnew.Builder.addField(Builder.scala:43)
[error] at sbt.librarymanagement.ModuleIDFormats$$anon$1.write(ModuleIDFormats.scala:46)
```
This is because Contraband generates `flatUnionFormat5[CrossVersion, Disabled, ...]` for all of the subtypes of `CrossVersion`, which uses the runtime type information. Now that `Disabled` object is also in the mix, this created JSON that `CrossVersionFormats` cannot deserialize. This brings the code into src/ so we can write this part manually.
Ref https://github.com/sbt/librarymanagement/pull/280
This is to workaround bincompat error detected by sbt community build.
```
[cats] [error] java.lang.NoSuchMethodError: sbt.librarymanagement.CrossVersion$.Disabled()Lsbt/librarymanagement/Disabled$;
```
There are just too many instances in which sbt's code relies on
the `lastModified`/`setLastModified` semantics, so instead of moving
to `get`/`setModifiedTime`, we use new IO calls that offer the new
timestamp precision, but retain the old semantics.
Ref https://github.com/sbt/ivy/pull/26
Ref sbt/launcher#38
JDK 9 complains when java.lang.reflect.Field#setAccessible is called. So on
JDK 9 to get the default Authenticator on JDK you can just call
Authenticator.getDefault(). However ivy targets JDK 6..
So on JDK < 9 we do what we've always done, and on JDK 9+ we use java
reflection to call Authenticator.getDefault(), which is public and doesn't
require setAccessible(true).