Polish president signs controversial media bill into law