The European Parliament has voted to ratify the Paris Agreement, edging the landmark treaty closer to implementation.