I think paglia is straw which would make pagliaccio something related to or made of straw. If you then think of a scarecrow (traditionally depicted as being made of straw) it is easy to come up with a new meaning involving a clown. However, the word has straw origins, which could be confirmed by someone having a proper Italian dictionary (not just a translating one).