There is a fuse to check in the fuse box that can deal with a low voltage to the MAF sensor, if that checks out then I would replace the wire/connector going to the MAF. It's kinda common for to become damage or just be faulty from age and heat getting to them.
That can surely cause a rough idle situation if it's not working correctly..
That 3 wire connector in the back is for cali emissions cars, dont worry about it as your car likely doesnt hae them.