Wigan Athletic have completed the signing of striker Martyn Waghorn from Leicester City on a deal until the end of the season.