I agree with Pete L. Clark's first paragraph in that you should be first sure you understand the conventions of author order, especially in regard to paper contribution, before you suggest any changes. It would be a great start to a conversation with your immediate supervisor or PI.
You say you've done almost everything, but I would suggest thinking about and listing each of the contributions you made. When authors are ordered, it's not necessarily the amount of time they've spent but the type and quality of their contribution.
- Did you come up with the original idea?
- Did you design any of the experiments?
- Did you suggest any changes to any involved experiments/prototypes?
- Did you run any of the experiments?
- Did you analyze the data?
- Did you interpret the data?
- Did you write the paper?
- etc. ...
Since I don't know the specifics of the situation or the field it's difficult to give you my personal opinion on whether you deserve first authorship or should ask for it. If your involvement comes down to essentially following specific instructions (running already designed experiments, writing up the already interpreted results) without any or with little creative input from yourself, then I don't believe you do. Since this paper has already been submitted once, the time has passed for you to ask unless you personally make significant changes or additions.
Asking for first authorship (or an authorship in general) without a good understanding of conventions can have a negative impact on your relationship with your immediate supervisor without gaining you anything. In my personal experience I've heard interns ask for an authorship when their contribution was pressing the start button in a series of experiments because 'it doesn't affect the other authors,' which is both laughable and ridiculous.
Another note of caution - the paper review process often takes months, and can extend to over a year in some cases just for the first round. Since this is again your first work, make sure you understand where the delay is coming from before getting too anxious. If the delay was in fact on them, was it because significant changes had to be made? With the current rejection, I would not ask your supervisor why the re-submission is taking so long, but how you can help address any of the reviewer comments to make it suitable for re-submission or submission to another journal. Ask for a copy of the reviews if you don't have them already; it may be very clear why it is taking so long if there are large issues to be resolved.