UK, Scotland agree to explore greater autonomy despite divisions over independence