Search refactor predecessors: ImmutableStack, Option, More Extensions

@ikeough @lukechurch As discussed in https://github.com/DynamoDS/Dynamo/pull/3463
Many of these are used in Stephen's `SearchModel` impl.