Britain's main political parties struck what they said was a historic deal to grant Scotland tax-raising powers and greater autonomy.