An Australian resident has been sentenced to 20 years after judges found she killed her friend with a cyanide-laced coffee in Jakarta.