Add WARPLossLayer

This PR sets the target of #126 to the dev branch and will continue to make it work with the other layers. For the detailed motivations, references and discussions, please refer to the original PR.