A ‘prolific offender’ who abused women across Edinburgh, Midlothian, Lanarkshire and Fife has been jailed.