Automate cleanup of global resources opened by Palaso assembly

At the moment, this applies only to Linux/Mono for one particular
resource, but could be extended as needed.