Unfolding recurrence by Green's functions for optimized reservoir computing