Rebuild plugin should copy the causes of the original build to support rebuilding pipeline builds

...new build. Besides the original causes, a UserIdCause is added for the user who started the rebuild action.

A test is added to check that the causes are copied.