What are these openings around the Comet's engine intakes?
Short answer

Top (Comet 1)

1: Air conditioning -- 2/3: Engine cooling -- 4: Likely fuel venting -- 5/6: Engine cooling  

Bottom (Comet 4)

1: Engines cooling



Details

The De Havilland 106 (DH 106) "Comet" was a UK airliner, the first commercial one with jet engines, introduced in 1952 under the colors of BOAC. The last aircraft was retired in 1997. The Comet 1 is known as a great engineering achievement, but also for its initial series of catastrophic failures. These accidents led to the understanding of metal fatigue caused by decompression cycles (after a famous structural test) and the generalized use of openings with rounded corners by all airliners. Beside technical achievements, the aircraft and other of the same era are also remembered for their beautiful shapes.

Cutaway, showing how engines are buried in the wings:


Source

The Comet 1 was an interim version until the more powerful Rolls-Royce Avron engine development was complete. The Comet 1 engines were Halford H.2 Ghost aka De Havilland Ghost 50 Mk1 or simply Ghost.


De Havilland Comet 1XB - From photo by Ruairidh MacVeigh, Flickr

From left to right:


I cannot definitely identify the smaller hole near the fuselage, it might be the ram air intake used for fuel venting. A system which was used quite frequently for emergency landing until the engine bearing overheat problem had been fixed. In some description this hole is completely on the right of the outboard engine.
Ram air intake below inboard engine intake is for cabin air conditioning. Ram air goes to the heat exchanger which cools cabin air circulated in the heat exchanger. The Comet was one of the first aircraft to use bleed air from the compressor and the turbine to provide comfortable cabin pressure at high altitude.
Ram air intakes on each side of the outer engine are used for engine cooling.


On the top of the wing, there are scoops, more visible in the Comet 4 picture below.


De Havilland Comet 4 -- From photo by edk7, Flickr

The Comet 4 engines were Rolls-Royce Avon AJ.65 with twice the thrust of Halford H.2 Ghost.


The engine cooling intake between the two engines has been enlarged and the second one (outboard) removed.
The four air scoops over the wings are additional intake for engine (e.g. to ventilate fuel vapors) and accessory cooling (e.g. for alternator).


Additional information:


DH 106 Comet 1XB at Canada Aviation and Space Museum
Airliner Tech Series 07 - De Havilland Comet
De Havilland 106 Comet presentation