The UK government has announced that driverless cars will be allowed on public roads in trials from January next year.