Koszul duality of the category of trees and bar construction for operads