Added thread join to RLGlue interface to ensure synchronization between
episodes of an RLGlue interaction.