paint_server: introduce PaintSource trait

Gradient and Pattern have a similar structure, so we make them
implement a common PaintSource trait
3 jobs for paint-server in 8 minutes and 40 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #149772
fedora test

00:08:12

 
  Lint
manual #149774
allowed to fail manual
clippy
passed #149773
rustfmt

00:00:27