Elastic fields of stationary and moving dislocations in three-dimensional finite samples