Russia has changed its laws in a bid to allow it to ignore prosecution by international criminal courts.