Free and forced dynamics of a three-dimensional curved elastic beam