Yep thats the thermostat housing.
You will need to remove the cambelt and back pan to get the thermostat and pipe out.
Stick a new thermostat in it for the cost whilst you are there (maybe a cooler running one) stick a new o-ring/seal on the end of the pipe. Maybe worth doing a cambelt and water pump change, depending on when it was last done. Give the oil cooler a visual inspection whilst you are there, just to make sure the 2 bolts on the top cover are ok, IE not leaking. The oil cooler is under the inlet divider (the black bit you have stick tissues in).
With regards to the 'bastard bolt', I presume you are talking about the bolt on the right hand side of the head, IE the other end of the pipe. Yes its a git. The best piece of advise I can give you, is as I've said I am pretty certin you need to remove cambelt/back pan, once removed you can geta 10mm spanner in there from the front of the engine. Its a pain as you can only get 1/4 or even 1/8 a turn and then you end up having to remove then turn the spanner over to go again. You can get it from the bottom IIRC, but the last time I did it that way it was 1/8 a turn, turn spanner over, 1/8 a turn then climb out and do 1/8 a turn from the top - then back under for another 2 x 1/8 a turn. Its not fun.
Hope that helps.