Which country became a self-governing state within the British Empire in 1959, declared independence from Britain, joining the Federation of Malaysia in 1963, and left the federation on 9 August 1965?