Loop-Star and Loop-Tree Decompositions: Analysis and Efficient Algorithms