Closed-form solutions for the first-passage-time problem and neuronal modeling