The subject are the apostles and the Holy Spirit together, in a synergic or co-acting way.
Bear with me as I will now explain this intriguing point:
God-the Father through His co-eternal Logos/Son, to whom pertains the same divine glory and honour as to the Father (John 5:23) gave to humans an authority to become sons of God, co-heirs of Christ Jesus - the Incarnate God (John 1:12). The "authority" means a capacity, a power and possibility, not an automatic possession. That is to say, if I am given a tomahawk to repel a grizzly bear attacking me and I do not use it out of fear or some other pusillanimous feature within me, then bear will have me for a dinner to be sure. Similarly, God gave humans through His Incarnate Logos His Power for overcoming the power of sin; yet, man is free to use this Power to defeat the power of sin or to remain in slavery of sin and be eventually be fully defeated and "devoured" by it, accepting the "second death" (Revelation 2:11). Yes, even after Christ offered all humanity to be set free from sin through Him, still humans are left an unrestrained ability (called "freedom of choice") of not using this authority given by Christ and, thus freely choosing unfreedom - i.e. the slavery to sins, the end of which is the death (cf. Romans 6:23).
However, what about them who use the Authority to smash the teeth of sin through It and become the sons of God by adoption through the natural only-begotten Son of God - the Lord and the God Jesus Christ? Now, in them there is a presence of the Father and the Son (John 14:23), and of the Holy Spirit of whom they become living temples (1 Cor. 6:19).
What are they able to do with this Uni-Threefold presence? Oh, a stupid question! Rather one should ask: What are they not able to do with this Presence of the Trinity in their hearts? And if somebody hears that this is a rhetorical question, he will not be mistaken, for indeed: everything in is possible for a believer, for a God-possessing person (cf. Mark 9:23)! For example, can they love each other as God-the Father loved them through showing this love by the sacrifice of His Son for them, or can they love each other as God-the Son loved them by undergoing the death on the Cross for them? Yes, they can and they are commanded to do so (John 15:12)! But not by themselves only, but by God working in their hearts, and they co-working with God, for such things are impossible without Christ (John 15:5). Yet, neither God is a hypnotiser who works without our consent, He cannot love instead of us, but awaits us to participate in His love as fully as possible, striving to "His-ly" (i.e. that pertains to Him) perfection that He does in no way grudge from them but rather asks them to embrace (Matthew 5:48).
If so, now a further question that pertains to the gist of the present matter: what is more, what is greater, love or forgiveness? A stupid question, as a matter of fact! Both are divine qualities and the second is impossible without the first, for one can forgive only by loving, and vice-versa: loving necessarily will lead to, eventually, forgiving. Now, if in God the two are together, in humans those two features appear to be in a dynamic cause-effect and processual way, as love developing to forgiveness. However, even among humans, still both love and forgiveness somehow contain and imply each other necessarily. If a husband continues to love his wife even after having known about her cheating on him, then he will necessarily also forgive her, for continuation of love necessarily implies the continuation of the readiness to forgive also. Therefore, if God gives His disciples the authority to love each other (and even all humans including enemies) in His-ly way, then necessarily God gives them also authority to forgive as well in His-ly way. Yet, as this love humans have synergically with Him, so also the forgiving humans have synergically with Him, and thus the subject of the passage are both apostles and God - the Father, the Son and the Spirit, present in the hearts of the apostles and working with the latter freely co-acting with the Trinity.
Yes, horrible is the divine authority granted by Christ to His disciples; angels will not be given the authority to be Judges, but to the apostles and all the Christians this authority was given (Matthew 19:28), even to extent of the authority of judging the angels (1 Cor. 6:3) (of course, the fallen angels are implied, for why to judge the good angels, unless one is out of ones wits?); thus, Christians become co-gods with God by adoption, and they love and judge as does God, through Him, in co-action with Him.