This patch allows to 'floor' the origin of newly created meshes, instead of using the center all the time.
The motivation for this change is to simplify the workflow with the 3d cursor orientation while placing meshes on top of meshes. As for now the user always has to adjust the new mesh to not penetrate the surface, and it's often just annoying to have the origin in the center.
Here is how this looks in practice:
This only touches the C side, later on at least the torus, which is implemented in python, should probably be updated as well.