N-Hydroxycinnamoylamides and related compounds as inhibitors of histone deacetylases, their preparation, pharmaceutical compositions, and use in therapy