Swedish researchers have discovered a new test which can detect risk of liver disease years before symptoms typically appear.