I wouldn't bother shaving your hair. I have never heard of anyone getting lice from hostels, and although bedbugs are quite common, they bite your skin and having lots of hair makes it harder to get to your skin.
There is no guarranteed protection against bedbugs, but a permethrin treated sleeping bag liner is the best protection against bedbug bites. For more information:
http://www.travelgear.com.au/mm5/mer...gory_Code=BBUG
Bed bugs aren't confined to hostels and you're possibly more likely to catch them from buses, trains and boats. They often hop from one bag to another while they are in the baggage compartment of a bus.