Russia says it will withdraw from the International Criminal Court (ICC) under a directive signed by President Vladimir Putin.