You're asking a bunch of questions at the same time.
The line for the bus in the morning is big as everyone wants to get up before sunrise. You can walk up, which, depending on your physical condition, does not have to take more than 45 minutes.
Going down is faster. But, also, not everyone will want to leave at the same time, so taking the bus down is also an option.
The doors to Machu Picchu open at 6, so that's when you're allowed in. Apparently, the doors to Huaynapicchu only open at 7, which you get to after entering Machu Picchu. The strong implication is that you have to start your ascent of Huaynapicchu between 7 and 8.
I'm in Peru now and have asked several people, both Peruvian and foreigners, whether the two groups for entering Machu Picchu mean that you have to leave when your time is 'up'. Every answer I received was either "I don't know" or "No, you can stay as long as you like". This is only hearsay, but the best I can offer. The official ticketing site for Machu Picchu does not seem to explain this.
After you've come down from the mountain, either by bus or on foot, getting to the train station will take only a few minutes. So, it's definitely possible to get a 14:30 train. But, why not take the late train? Aguas Calientes is not very interesting, but it's worth to stay up at Machu Picchu for as long as you can. But, do bring snacks and drinks.
If you do take the late train out of Aguas Calientes, be aware that, if you don't have transport arranged from Ollantaytambo, or are not staying in Ollantaytambo, you might have a hard time getting transport out of there to Cusco. Surprisingly, for all the taxis and busses that pick tourists up from the train, almost none cater to those traveling on their own.