The Mishna (Kidushin 4:14) and Gemara (Yoma 28b) states that Avraham kept all of the mitzvos, even those established by the Rabbis such as Eiruvei Tavshilin (or Techumin). This is mentioned in various places throughout Midrashic literature as well (Midrash Rabba 64:4, Tanhuma Lech Lecha 11). This is usually understood to apply to the other forefathers as well and perhaps Yakov's children too (see Pesachim 50a that Yehudah wouldn't have married a Canaanite because his forefathers wouldn't have either). The only exception to this that I know of is the Rama (Teshuva 10) who posits that if Avraham kept all of the commandments, his household members and children (specifically Yaakov) did not.
What follows is the approaches of various commentators in understanding this (rather difficult, as the questioner pointed out) midrash.
Rashi in various places (particularly Beraishis 26:5) indicates that he accepted this Gemara at face value. Hence, he mentions (Beraishis 32:5) regarding Yakov that he kept all 613 commandments. This is also explicitly mentioned by the Rashbatz in his introduction to Magen Avos, where he explains that 'certainly we do not disregard the literal meaning of this statement' despite his explanation of the significance of Eiruvin as the example used by the Gemara. Additionally, the Sefer Ha'Eshkol (Albek, Tefillah pg 12) says that all three forefathers prayed three times a day, as they kept all of the commandments and rabbinic enactments. Perhaps mitigating the issues slightly is a responsum from the Geonim (teshuva 45 in the version published by Ofek, 2002, though there's some controversy about it) which implies that the Avos only kept the Biblical commandments, but the author still believes in the (mostly) literal understanding of this midrash. This understanding is also put forth by the Radvaz (Teshuva 2:696), Maharsha (Bava Basra 16b and a few other places) and the Noda Biyhuda (Tzlach Chulin 91a).
Many were still bothered by the fact that the Avos seems to have violated some of the commandments, such as the prohibition of marrying two sisters. Therefore, the Daas Zekainim (46:7) and Maharal (Gur Aryeh Beraishis 37:2) both explain that the forefathers weren't obligated, but kept the commandments anyway because they wanted to. The same idea is expressed by R. Eliyahu Dessler (Michtav Meeliyahu 3 pg. 51) Maharal (there and Tiferes Yisrael ch. 20) therefore adds that they only kept the positive commandments, but didn't avoid prohibitions.
The Nefesh Hachayim (1:21), as well as the Rashba (Shut 1:94) explain that the Avos were able to intuit what would please God the most at any given time and situation, which meant that, ipso facto, they would usually be keeping the commandments of the Torah. However, if God would rather Yaakov marry both Rachel and Leah, Yaakov was free to do so. A similar comment is made by the Ohr Hachayim (Beraishis 49:3).
Thus far, all of those mentioned have taken the midrash literally. Most later commentators seem to take this approach as well; one needs only to open up a Chasam Sofer, Pardes Yosef or any contemporary collection on the parsha to find them going into lengthy discussions of how the avos kept various details of the mitzvos. However, not all of the commentators took this idea literally.
Most explicit is the Meiri, who, in his introduction to Maseches Avos interprets this saying allegorically, that the moral lessons implied by all of the mitzvos were understood and practiced by the avos. Another person explicitly rejects the literal interpretation of this Midrash is R. Avraham son of the Rambam (Commentary to Beraishis 35:4), who explains that Chazal merely used hyperbole to express the extent to which the avos were committed to God. A much later (and of a completely different persuasion) thinker to take this approach is the chassidic Shem MiShmuel, who says (Parshas Shemini, 5678) that "of course the explanation is not that they kept all the commandments as they are today, which is of course impossible... but rather they kept the light of the mitzvos."
There may be many other commentators who rejected the literal interpretation of this Gemara, though they do not (to my knowledge) say so explicitly. The source used by Chazal to say that Avraham kept the entire Torah is the verse in Beraishis 26:5 - עֵקֶב אֲשֶׁר-שָׁמַע אַבְרָהָם בְּקֹלִי וַיִּשְׁמֹר מִשְׁמַרְתִּי מִצְוֹתַי חֻקּוֹתַי וְתוֹרֹתָי. However, Rashbam, Chizkuni, Ibn Ezra, Radak, Ramban, and Seforno all explain that particular verse as referring to general moral obligations, universal obligations, and the specific commandments actually given to Avraham such as circumcision. Therefore, it could be that all of these commentators are unwilling to take the Gemara mentioned above literally. The Rama (Teshuva 10, mentioned above) also seems hesitant to accept this midrash at face value.
The Ramban's position is particularly interesting, because he first states (Beraishis 26:5) that there are many obvious difficulties in believing that the Avos literally kept all of the commandments, and seems to be comfortable rejecting this concept, at least as presented by Rashi. On the other hand, he does try to give rationales for all of the things that the Avos did, and states (to Beraishis 38:2 and Vayikra 18:25) that even assuming that they kept all of the commandments, this was only so in the Land of Israel.
Finally, I should mention the Rambam in Hil. Melachim 9:1 states that the forefathers were only commanded regarding a few things, specifically the seven universal (or 'Noahide') commandments, with a few additions here and there (circumcision etc.), implying that the avos did not actually keep all 613 commandments (or at least weren't commanded to do them). The Raavad (there) seems to agree with this principle.
(Many ancient sources on the topic can be found here: http://alhatorah.org/Avot_and_Mitzvot_%E2%80%93_Was_Avraham_the_First_Jew/5)