3 S's: shackle, sheave, safety
Hi Chip and Angela,
That thing that came loose off of the top of your sail is a shackle. You don't want to just use some snap hook. The shackle should be rated for the heavy loads that can be produced on your mainsail. The shackle is engineered for its purpose with a very positive fastening position and if it's releasing when you don't expect it to, it either wasn't properly fastened or may have worn out so that it won't fasten well anymore. Since you are very new to this you may want to retrieve that shackle and study it to make sure that you understand how it is supposed to be fastened. If it still won't work reliably, get some advice from a local pro on using it or replacing it.
The line for halyards and sheets is a very strong non-stretch type. You local marine shop should be able to help you with that. If you pick up a copy of the West Marine catalogue you will find some useful oveview info at the beginning of each product section.
That pulley type part that the halyard rolls on is called a sheave. If you haven't noticed already, otherwise recognizeable devices get special names once they cross the threshold of the edge of the deck. The special naming comes in handy because each of those otherwise common devices ends up in a special engineered use, such as the pulleys at the top of the mast are sheaves and the pulleys that the jib sheets go thru are sheet blocks.
As far as the number of halyards, I'm used to larger vessels so I can't talk specifically about the E25. What you typically want is at least two aft halyards for dealing with the main (one spare) and at least two forward halyads for dealing with two headsails (one for the jib, one for a spinnaker).
When it's time to climb the mast I wouldn't fixate on only doing it once. I would make a reasonable attempt to have all of the parts and tools you need to get the job done the first time. On the other hand, you may find it to be a discovery mission as many projects are on boats, so be satisfied with accomplishing at least the discovery up there and as much of your other project goals as you can that first ascent. Once on top you need to make good use of the time to study the condition of all of the hardware up there and make sure it's all in good shape.
To help you get unconfused a trip to a good book store should help you find a good reference manual for sailboats, such as Nigel Calder's boat electrical and mechanical one. I don't know the exact title but I've given enough keywords to find it. Take the time to dive into studying the different sections so that you can develop your own background and know more of those special boat words.
Before you actually climb please do a thorough search of this forum for a recent thread with mast climbing advice. Safety is a huge issue here and some of the most knowledgeable sailors here laid out some excellent guidlelines on how to proceed safely. Better yet, find someone to help who has done it before. In your case the safety end could be tricky since one halyard is already stuck and you want to have at least two on your harness for safety. If you don't already have one you'll need a real climbing harness or a bosun's chair.
Have a nice climb and good luck. I think that you will enjoy the view also.