The Solomon Islands has informed China it will terminate the landmark security agreement the nations struck in 2022 as it moves closer to Australia.