A Cambridge firm’s drug worked wonders, but was hugely costly – more than Costa Rica thought it could spend on one child among so many