After merging objects: how to get rid of double faces? I have 2 objects. They have some edges and faces in common (but also some differences of course). I can merge these with ctrl+J. I can then do 'remove doubles' to remove the double vertices.

However, this way I end up with double faces and edges.

For example, I have a face of model A and an edge of model B. The edge of model B is in the same plane as the face of A and the edge of B also goes through the edges of the face of A.

I would like that the edge of B cuts the face of A and its edges, so that the edge of B becomes a part of the edges of the faces of A.
That way I can do further editing on the model.

A 'manual' fix is possible but then I'll have to it over 150 times which is a bit much.

So, is there a simpler automated way to do this in Blender? I've searched a bit around but I don't even know how it's supposed to be named, so all tips are welcome.

The end result will be a 3D-printed lens adapter for a vintage lens so the accuracy of the model is rather important.

Thanks in advance!

Update: 
My goal is to merge the light and the dark blue parts.

The boolean operator seems to work fine with basic cubes, but it fails when using it with my more complex model. Depending on whether I set the normal of the dark blue ring on inside/outside it either doesn't work (throws error) or it gives a weird results with only around half of the faces shown. Looks a bit like This recent problem. I've applied scale and normals with ctrl+A and ctrl+N.
As I cannot obtain any good result with the boolean (starting from Blue Fox's file), I propose this editing approach.

The steps below are in the layer #15 of the blend file : 




The objects are still separated. Open the faces to be merged.
Relocate the upper mesh and merge the two
Select the upper opposite edges and CtrlE and "bridge edge loops"
The same for the lower opposite edges
And the same for the last opened part, but without the extremities, because of the needed ngones at these extremities
Make faces for the extremities (select manually the vertices and face F)
Remove doubles


This is not a real answer of the question (more or less "how to make the boolean work"), but the job is done. No vertices were moved.

I have noticed these here :


Face centers with no face (maybe construction points ?), surrounded by O
A plane, is that printable (1) ?
And in (2), the inner faces overlap