Team calendar missing leaves bugfix (#6061)

Team leaves were not correctly fetched when they were overlapping
months. A new condition is added to retrieve any leaves that start,
end or overlap the given time frame.